无法在 Ubuntu 20.04 上进行全新安装后,正确配置用于 React 项目的 Java 1.8。

huangapple go评论69阅读模式
英文:

Cannot setup java 1.8 correctly for react projects after a fresh install on ubuntu 20.04

问题

我最近在全新安装的Ubuntu 20.04上安装了Java 1.8,似乎我可能有一个不正确的Java 1.8配置。
我正在从一个名为prisma(prisma.io)的服务中运行Docker镜像,但在这个全新安装上出现了问题。我在终端上获得了一些有关Java的信息,以及与Docker和Java相关的错误,你可以在这个pastebin链接中查看:pastebin.com/y0e7CbpL

我在另一个运行Ubuntu 18.04的系统上有相同的设置,同样是运行Java 1.8,没有出现任何问题。我尝试以完全相同的方式安装它,但我想我可能遗漏了一些步骤...

有没有明显的问题可以看出是Java配置不正确导致的?如果可能的话,新的Ubuntu会导致这些问题吗?
我还应该提供更多信息吗?如何提供这些信息以帮助解决问题?

(附注:我在React Native的Android项目中也遇到了问题,无法构建一些Firebase包)谢谢!

英文:

I have recently installed java 1.8 on a fresh install of ubuntu 20.04 and seems like I may have a bad java 1.8 setup.
I'm running a docker image from a service called prisma(prisma.io), and it's broken now on this fresh install. I got some java info on the terminal plus the docker java related errors into this pastebin: pastebin.com/y0e7CbpL

I have this same setup running on a separate ubuntu 18.04, also running java 1.8 with no issues. I tried to install it exactly the same way but I guess I missed something...

Is there something obvious that can be spotted there about why java can be badly setup?
Also how likely could it be for the new ubuntu to be causing these problems, if possible at all?
Is there more info that I should provide (and how) to help figure this out?

(side note: I'm also having issues with react-native android project where it cannot build some firebase packages)
Thanks!

答案1

得分: 0

以下是翻译好的内容:

这确实是一个 Java 问题。
只有在从另一台项目正常运行的计算机上复制整个文件夹 /usr/lib/jvm/ 并将其替换为我机器上的文件后,我才能解决这个问题。

附注:这是 Java 版本:

$java -version
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~18.04-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)
英文:

IT was indeed a java problem.
I could only solve this problem after copying the entire folder /usr/lib/jvm/ from another computer where this project was running fine and replace it with the one on my machine.

PS: this is the java version:

$java -version
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~18.04-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)

huangapple
  • 本文由 发表于 2020年9月14日 18:21:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/63882413.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定