2012-11-09 35 views
7

安装JDK 1.7时,当我在甲骨文的Linux使用以下错误在linux

RPM -ivh JDK-7u9-linux的-i586.rpm

安装JDK 1.7然而我收到以下错误,我该如何解决这些错误并安装jdk 1.7?

任何帮助是非常可观的。

感谢

rpm -ivh /tmp/mnt/jdk-7u9-linux-i586.rpm 
Preparing...    ########################################### [100%] 
    1:jdk     ########################################### [100%] 
Unpacking JAR files... 
     rt.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/rt.pack 
     jsse.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/jsse.pack 
     charsets.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/charsets.pack 
     tools.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/lib/tools.pack 
     localedata.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/ext/localedata.pack 
     plugin.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/plugin.pack 
     javaws.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/javaws.pack 
     deploy.jar... 
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/deploy.pack 

我的Linux版本是oracle linux 5.5

+0

这不是一个编程的问题。事实上,它*看起来像一个基本的系统管理问题......关于如何在Linux机器上安装Java。 –

+0

@StephenC那么移动这个问题在哪里? – user75ponic

+0

superuser.com或serverfault.com,取决于您是否以“专业能力”进行此操作。 (这是一个有点奇怪的区别,国际海事组织...但这就是他们玩的方式。) –

回答

5

1)我同意斯蒂芬ç - 这肯定听起来像“权限”

2)“命令” - 你必须明确地为“根”

3)做一个ls -ld /usr/java/jdk1.7.0_09/使运行命令确定该目录存在。

如果没有,可以考虑做一个“MKDIR在/ usr/java的”,并重新运行该命令

4)该线程可能会被迁移到“superuser.com”,这是更多的行政问题

5)如果您还没有解决方案,请务必指定您的Linux版本。

============================================== ====================================

附录:

的职位给了印象JDK安装失败;听起来像是没有的RPM正在被提取。

基于后续信息,这听起来像它只是一个警告:

In version 7u9, shows the following error messages related to file extension pack, which is used in the facilities of Java applications, using Java Web Start. This does not affect the functionality of the JRE installed on your system, made ​​by this binary package format (RPM).

Your install of Sun jdk-7u7-linux-x64.rpm was successful. The error messages displayed, are normal. They exist because those files don't exist in the package. I get them when installing the Sun jre rpm packages. Just ignore those particular error messages.

+0

我以root身份运行并且目录/ usr/java确实存在。 – user75ponic

+0

那么你看看是否存在“/usr/java/jdk1.7.0_09/”?如果没有,您是否尝试使用“mkdir /usr/java/jdk1.7.0_09”来查看您是否有权创建它?这是所有基本的故障排除...... PS:你的Linux版本究竟是什么? – paulsm4

+0

我的linux版本是oracle linux 5.5。谢谢 – user75ponic

2

你可能需要囤的rpm命令,作为根。

另一种可能性是,SELinux正在阻碍。你有严格的政策启用SELinux执行吗?

+0

嗨Stephen rpm已经作为根运行 – user75ponic