Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to install a package that depends on Java 1.7 with yum. I do I have Java 7 on my machine:

#echo $JAVA_HOME
$JAVA_HOME
/usr/lib/jvm/jre-1.7.0-openjdk.x86_64
# java -version
java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

But yum still complains about not finding java 1.7:

--> Finished Dependency Resolution
Error: Package: <some package>
           Requires: jre >= 1.7.0
           Available: java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 (base)
               jre = 1.5.0
           Available: 1:java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64 (base)
               jre = 1.6.0
           Available: 1:java-1.6.0-openjdk-1.6.0.0-1.48.1.11.3.el6_2.x86_64 (updates)
               jre = 1.6.0
           Available: 1:java-1.6.0-openjdk-1.6.0.0-1.49.1.11.4.el6_3.x86_64 (updates)
               jre = 1.6.0
           Available: 1:java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64 (updates)
               jre = 1.6.0
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
<some package>.noarch has missing requires of jre >= ('0', '1.6.0', None)

Any idea as to what might caused this? Thanks,

share|improve this question
add comment

1 Answer

I know that you installed java, but maybe you should try running sudo yum install java to make sure yum "remembers" installing it.

EDIT
You could also try running sudo rpmdb --rebuilddb to rebuild the rpm database.

share|improve this answer
    
I ran rpmdb --rebuildb, still doesn't seem to help. And are you suggesting remove the current java and run yum install java ? –  One Two Three Jan 24 '13 at 21:41
    
@OneTwoThree Either that, or run yum install java without uninstalling java. OBTW, did you install java with yum? –  BenjiWiebe Jan 24 '13 at 22:04
    
No, I installed with rpm –  One Two Three Jan 24 '13 at 22:19
    
@OneTwoThree Well try installing it with sudo yum localinstall <rpm-file>. –  BenjiWiebe Jan 25 '13 at 2:26
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.