Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am a total noob with linux. So please explain clearly if you have a solution for me. I have an VPS and I want to update JAVA. I found a guide on the Java site which says:

rpm -e < package_name >

I searched for the packages:

[root@srv1 ~]# rpm -qa | grep java 
java_cup-0.10k-5.el6.x86_64
java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64

Than I tried to do the delete command

[root@srv1 ~]# rpm -e java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64

error: Failed dependencies:

    java-gcj-compat is needed by (installed) java_cup-1:0.10k-5.el6.x86_64
    java-gcj-compat >= 1.0.70 is needed by (installed) sinjdoc-0.5-9.1.el6.x86_64

What should I do now? Removing has worked thanks to the answer below

Problem two!

Now am I installing this package from java

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

Can someone help me again with this?

share|improve this question
    
The errors you see there are normal for that java distribution. –  ewwhite Dec 2 '12 at 10:52
    
That means that it is ok now? But when I do java --version it gives an error that it can't create a virtual machine. –  JochemQuery Dec 2 '12 at 10:53
    
or should I reboot my server? –  JochemQuery Dec 2 '12 at 11:04
    
Also, where did you get that version of java? –  ewwhite Dec 2 '12 at 11:17
    
java.com/nl/download/linux_manual.jsp , it's a dutch link. I took the first one. –  JochemQuery Dec 2 '12 at 12:07
show 2 more comments

1 Answer

up vote 1 down vote accepted

Here's all you'll need to do...

yum erase java-1.5.0-gcj - That should take care of the dependencies...

If not, you can also remove the java_cup and sinjdoc packages as well.

From there, you should be able to install the java package you want per the instructions.

share|improve this answer
    
thank you, can you look to my second question to? –  JochemQuery Dec 2 '12 at 9:12
    
Java 1.7.09 installed Thank you very much! –  JochemQuery Dec 2 '12 at 16:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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