Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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

share|improve this question
This is not a programming question. In fact, it looks like a basic system administration question ... on how to install Java on a Linux machine. – Stephen C Nov 9 '12 at 5:07
@StephenC So where to move this question? – Polppan Nov 9 '12 at 5:09
superuser.com or serverfault.com, depending on whether you are doing this in a "professional capacity". (It is a somewhat bizarre distinction, IMO ... but that is the way that they play it.) – Stephen C Nov 9 '12 at 5:27
I have already moved. – Polppan Nov 9 '12 at 5:27

closed as off topic by Stephen C, Nambari, Sirko, Ollie Jones, Linger Nov 9 '12 at 15:44

Questions on Stack Overflow are expected to relate to programming or software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
I ran as root and directory /usr/java does exists. – Polppan Nov 9 '12 at 5:13
So did you look to see if "/usr/java/jdk1.7.0_09/" existed, too???? If not, did you try a "mkdir /usr/java/jdk1.7.0_09" to see if you had permission to create it??? This is all basic troubleshooting... PS: Exactly what is your Linux version? – paulsm4 Nov 9 '12 at 5:16
My linux version is oracle linux 5.5. Thanks – Polppan Nov 9 '12 at 5:17
usr/java/jdk1.7.0_09 was created when I installed the jdk – Polppan Nov 9 '12 at 5:19
Please read my addendum above – paulsm4 Nov 9 '12 at 6:19
show 2 more comments

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?

share|improve this answer
Hi Stephen rpm has been run as root – Polppan Nov 9 '12 at 5:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.