Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors when installing jdk 1.7 in linux [closed]

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

like image 836
Jacob Avatar asked Nov 09 '12 04:11

Jacob


People also ask

Why is JDK not installing?

If it is not, please try to install x86 (32 bit) JDK. If it is x64 (64 bit) then, try to run with "Run as administrator" option by right clicking it. If it is not working either way, then please check the system log from Control Panel -> Administrative Tools -> Event Viewer and see what is going around on installation.


2 Answers

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.

like image 143
paulsm4 Avatar answered Sep 23 '22 12:09

paulsm4


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?

like image 36
Stephen C Avatar answered Sep 22 '22 12:09

Stephen C