我在 Ubuntu 22.03.1 上。我想使用 Oracle Developer Studio 作为 Fortran IDE。
我从以下网址下载了 OracleDeveloperStudio12.6-linux-x86-rpm.tar.bz2这里,解压它,并尝试执行它的安装脚本
sudo ./developerstudio.sh
终端返回:
Configuring the installer...
Searching for JVM on the system...
Java installation was not found on this computer
Java 1.5.0_03 or later is required for installing Oracle Developer Studio. Make sure that Java is properly installed and run installer again.
You can specify valid Java location using --javahome installer argument.
To download Java installation bundle (JDK or JRE), visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
因此我继续安装 JDK。我jdk-18_linux-x64_bin.deb
从链接下载。尝试使用终端安装和配置并sudo ./developerstudio.sh
再次运行命令,它给出了相同的错误。然后我卸载了 JDK 并使用 GUI 重新安装,仍然是相同的错误。然后我安装了apt-get
jdk 包,仍然是相同的错误。
我相信我的 Java 已经安装好了:
$ java --version
openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
$ whereis java
java: /usr/bin/java /usr/share/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/share/man/man1/java.1.gz
$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Aug 19 15:21 /usr/bin/java -> /etc/alternatives/java
$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 43 Aug 19 15:21 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java
我也在~/.bashrc中导出了它的路径,但仍然存在同样的问题。
export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"