依赖性解决(CentOs - Yum)


1

我正在尝试安装依赖于Java 1.7和yum的软件包。我在我的机器上安装了Java 7:

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

yum仍然抱怨没有找到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)

有什么可能导致这个的想法吗?谢谢,

Answers:


0

我知道你安装了java,但也许你应该尝试运行sudo yum install java以确保yum“记得”安装它。

编辑
你也可以尝试运行sudo rpmdb --rebuilddb来重建rpm数据库。


我跑了rpmdb --rebuildb,似乎仍然没有帮助。你建议删除当前的java并运行yum install java吗?
一二三

@OneTwoThree要么是这样,要么在yum install java没有卸载java的情况下运行。OBTW,你用yum安装了java吗?
BenjiWiebe 2013年

不,我rpm
One Two Three

@OneTwoThree试试安装吧sudo yum localinstall <rpm-file>
BenjiWiebe 2013年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.