Errors when installing jdk 1.7 in linux [closed]

*爱你&永不变心* 提交于 2019-12-23 08:40:03

问题


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:


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:

  • http://www.geilthings.com/wiki/Java#1.7.x

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).

  • http://forums.fedoraforum.org/showthread.php?t=285076

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.




回答2:


You probably need to tun the rpm command as root.

Another possibility is that SELinux is getting in the way. Do you have SELinux enforcing enabled with the strict policy?



来源:https://stackoverflow.com/questions/13302271/errors-when-installing-jdk-1-7-in-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!