linux安装java失败,在Linux中安装JDK 1.7时出现错误

When I am installing jdk 1.7 in Oracle Linux by using the following

rpm -ivh jdk-7u9-linux-i586.rpm

However I am getting the following errors, how can I resolve these errors and install jdk 1.7?

Any help is highly appreciable.

Thanks

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

My Linux version is oracle linux 5.5

解决方案

1) I agree with Stephen C - this definitely sounds like "permissions"

2) "sudo" - you must definitely run the command as "root"

3) Do an ls -ld /usr/java/jdk1.7.0_09/ to make sure the directory exists.

If it doesn't, consider doing a "mkdir /usr/java" and re-running the command

4) This thread will probably be migrated to "superuser.com", which is more for administrative questions

5) If you still don't have a solution, please be sure to specify your Linux version.

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

ADDENDUM:

The post gave the impression the JDK install failed; it sounded like none of the RPM was getting extracted.

Based on the subsequent information, it sounds like it's merely a warning:

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
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值