救命! 我无法弄清楚如何安装JDK!
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk available.
Error: Nothing to do
在这里,我手动下载了一些转的,从甲骨文网站上的最后一个:
[~]$ rpm -ivh java-1.7.0-openjdk-devel-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
error: Failed dependencies:
java-1.7.0-openjdk = 1:1.7.0.19-2.3.9.3.fc20 is needed by java-1.7.0-openjdk-devel-1:1.7.0.19-2.3.9.3.fc20.x86_64
[~]$ sudo rpm -ivh java-1.7.0-openjdk-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
Preparing... ################################# [100%]
file /usr/lib/jvm-exports/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
file /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
[~]$ sudo rpm -ivh jdk-7u21-linux-x64.rpm
Preparing... ################################# [100%]
file /etc/init.d/jexec from install of jdk-2000:1.7.0_21-fcs.x86_64 conflicts with file from package jdk-2000:1.6.0_38-fcs.x86_64
调试
这里的一些调试信息:
[/usr/lib/jvm]$ yum search jdk
Loaded plugins: langpacks, presto, refresh-packagekit
=========================================================== N/S Matched: jdk ============================================================
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
jdk.x86_64 : Java(TM) Platform Standard Edition Development Kit
ldapjdk.noarch : The Mozilla LDAP Java SDK
Name and summary matches only, use "search all" for everything.
。
[/usr/lib/jvm]$ yum list java*
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
java-1.5.0-gcj.x86_64
。
[/usr/lib/jvm]$ cat /etc/fedora-release
Fedora release 18 (Spherical Cow)
要求
我必须有“jni.h”, “libjava.so”, “libhpi.so”, “lipverify.so”和“libjvm.so”收录。
到目前为止,我已经发现,这些没有什么,我需要:
- 不希望的版本(肯定的):
- jdk1.7.0_06 < - 我很惊讶这一个,但它并没有libjvm也不libhpi
- Java的1.7.0
- Java的OpenJDK的
- Java的1.7.0-的OpenJDK,1.7.0.9.x86_64
- java的1.5.0-GCJ-4.4
- Java的1.6.0-的OpenJDK
- Java的1.7.0-openjdk.x86_64
- JRE-1.5.0-GCJ
- JRE-1.7.0-openjdk.x86_64
- JRE-的OpenJDK
- JRE-1.7.0
- JRE-7u11-Linux的x64.rpm的java-1.5.0-GCJ-1.5.0.0
- JRE-1.5.0
- jre1.7.0_11
- JRE-GCJ
而这些事:
- 想要得到的版本(即我所知道的,有可能是更多):
- jdk1.6.0_34-86
- jdk1.5.0_22-86
- 的java -6-的openjdk
有人可以帮我安装JDK1.6或Java-6-OpenJDK的吗?