我使用的是Ubuntu 16.04(32位)操作系统。
我安装了openjdk版本为"1.8.0_121"。
在编译文件时,我遇到了一个错误。
返回
尝试访问http://www.oracle.com/technetwork/java/javase/archive-139210.html,但由于多个错误无法安装。
因为出现了多个错误,所以无法安装。
还尝试了来自http://www.oracle.com/technetwork/java/javase/archive-139210.html的非rpm版本,并获得了以下结果:
在编译文件时,我遇到了一个错误。
You are attempting to build with the incorrect version
of java.
Your version is: openjdk version "1.8.0_121".
The correct version is: Java SE 1.6.
我已经尝试过
sudo apt-get install openjdk-6-jdk
返回
openjdk-6-jdk has no installation candidate
尝试访问http://www.oracle.com/technetwork/java/javase/archive-139210.html,但由于多个错误无法安装。
因为出现了多个错误,所以无法安装。
Unpacking...
Checksumming...
Extracting...
./jdk-6u45-linux-i586-rpm.bin: 144: ./jdk-6u45-linux-i586-rpm.bin: ./install.sfx.17173: not found
Installing JavaDB
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
error: open of sun-javadb-common-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-core-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-client-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-demo-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-docs-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-javadoc-10.6.2-1.1.i386.rpm failed: No such file or directory
Done.
还尝试了来自http://www.oracle.com/technetwork/java/javase/archive-139210.html的非rpm版本,并获得了以下结果:
Unpacking...
Checksumming...
Extracting...
./jdk-6u45-linux-i586.bin: 74: ./jdk-6u45-linux-i586.bin: ./install.sfx.17296: not found
Failed to extract the files. Please refer to the Troubleshooting section of
the Installation Instructions on the download page for more information.
我在某个地方找到了 openjdk-6_6b38-1.13.10.orig.tar.gz 忘记了我从哪里得到它,但是它抱怨我没有 JDK 主目录。
configure: error: "A JDK home directory could not be found."
我只是在深入挖掘,但一切都不起作用。 想知道是否有一些简单的存储库可以获取实际可用的openjdk-6-jdk?
谢谢!
sudo apt-get install lib32z1
命令来安装32位库。 - gsxruklib32z1
后,我成功运行了./jdk-6u45-linux-i586.bin
。我按照这篇帖子http://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6 将提取的文件移动到了/usr/lib/jvm目录下,但是脚本http://webupd8.googlecode.com/files/update-java-0.5b却显示404错误。我仍然没有一个有效的Java安装...java -version
命令无法工作。帖子中的脚本也无法使用。 - pottedmeat7