我的RPM在规范中包含类似的内容:
Requires: jre >= 1.6.0
不幸的是,我至少有一个系统显示“db提供”JRE,即使它不存在“rpm -q”命令。我已经尝试重建数据库(rpm --rebuilddb),但这不起作用。
如果我在Oracle Enterprise Linux系统(OEL)上进行测试安装,我会得到:
$ uname -a
Linux localhost 2.6.32-100.34.1.el6uek.i686 #1 SMP Wed May 25 17:28:36 EDT 2011 i686 i686 i386 GNU/Linux
$ rpm -qa | grep jre
$ rpm -ivv --test foo-bar-branch_bar3.4.0_40478-1.noarch.rpm 2>&1 | grep jre
D: Requires: jre >= 1.6.0 YES (db provides)
$ rpm -ivv --test foo-bar-branch_bar3.4.0_40478-1.noarch.rpm
D: ============== foo-bar-branch_bar3.4.0_40478-1.noarch.rpm
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening db environment /var/lib/rpm cdb:mpool:joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: read h# 399 Header sanity check: OK
D: added key gpg-pubkey-ec551f03-4c2d256a to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D: Expected size: 83726244 = lead(96)+sigs(180)+pad(4)+data(83725964)
D: Actual size: 83726244
D: foo-bar-branch_bar3.4.0_40478-1.noarch.rpm: Header SHA1 digest: OK (052080492165cf509fee5304fe508aa1954d98f4)
D: ========== relocations
D: added binary package [0]
D: found 0 source and 1 binary packages
D: ========== +++ foo-bar-branch_bar3.4.0_40478-1 noarch/linux 0x0
D: opening db index /var/lib/rpm/Basenames rdonly mode=0x0
D: read h# 36 Header V3 RSA/SHA256 Signature, key ID ec551f03: OK
D: Requires: /bin/bash YES (db files)
D: Requires: /bin/sh YES (db files)
D: Requires: /bin/sh YES (cached)
D: Requires: /bin/sh YES (cached)
D: Requires: /bin/sh YES (cached)
D: Requires: /bin/sh YES (cached)
D: opening db index /var/lib/rpm/Providename rdonly mode=0x0
D: read h# 362 Header V3 RSA/SHA256 Signature, key ID ec551f03: OK
D: Requires: jre >= 1.6.0 YES (db provides)
D: Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 YES (rpmlib provides)
D: Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 YES (rpmlib provides)
D: opening db index /var/lib/rpm/Conflictname rdonly mode=0x0
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D: 0 0 0 0 1 +foo-bar-branch_bar3.4.0_40478-1.noarch
D: installing binary packages
D: sanity checking 1 elements
D: computing 661 file fingerprints
Preparing packages for installation...
D: computing file dispositions
D: 0x0000fd00 4096 10118559 3213206 /
D: ========== +++ foo-bar-branch_bar3.4.0_40478-1 noarch-linux 0x0
D: Expected size: 83726244 = lead(96)+sigs(180)+pad(4)+data(83725964)
D: Actual size: 83726244
D: foo-bar-branch_bar3.4.0_40478-1.noarch: Header SHA1 digest: OK (052080492165cf509fee5304fe508aa1954d98f4)
D: install: foo-bar-branch_bar3.4.0_40478-1 has 661 files, test = 1
D: closed db index /var/lib/rpm/Conflictname
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm
在redhat(?也许是centos)系统上我得到了这个:
$uname -a
Linux arques 2.6.18-128.el5 #1 SMP Wed Dec 17 11:42:39 EST 2008 i686 athlon i386 GNU/Linux
$ rpm -qa | grep jre
$ rpm -ivv --test foo-bar-branch_bar3.4.0_40478-1.noarch.rpm 2>&1 | grep jre
D: Requires: jre >= 1.6.0 NO
D: package foo-bar-branch_bar3.4.0_40478-1.noarch has unsatisfied Requires: jre >= 1.6.0
jre >= 1.6.0 is needed by foo-bar-branch_bar3.4.0_40478-1.noarch
$ rpm -ivv --test foo-bar-branch_bar3.4.0_40478-1.noarch.rpm 2>&1
D: ============== foo-bar-branch_bar3.4.0_40478-1.noarch.rpm
D: Expected size: 83726244 = lead(96)+sigs(180)+pad(4)+data(83725964)
D: Actual size: 83726244
D: foo-bar-branch_bar3.4.0_40478-1.noarch.rpm: Header SHA1 digest: OK (052080492165cf509fee5304fe508aa1954d98f4)
D: added binary package [0]
D: found 0 source and 1 binary packages
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: ========== +++ foo-bar-branch_bar3.4.0_40478-1 noarch/linux 0x0
D: opening db index /var/lib/rpm/Depends create mode=0x0
D: opening db index /var/lib/rpm/Basenames rdonly mode=0x0
D: opening db index /var/lib/rpm/Pubkeys rdonly mode=0x0
D: read h# 46 Header V3 DSA signature: NOKEY, key ID 37017186
D: Requires: /bin/bash YES (db files)
D: read h# 46 Header V3 DSA signature: NOKEY, key ID 37017186
D: Requires: /bin/sh YES (db files)
D: Requires: /bin/sh YES (cached)
D: Requires: /bin/sh YES (cached)
D: Requires: /bin/sh YES (cached)
D: Requires: /bin/sh YES (cached)
D: opening db index /var/lib/rpm/Providename rdonly mode=0x0
D: Requires: jre >= 1.6.0 NO
D: package foo-bar-branch_bar3.4.0_40478-1.noarch has unsatisfied Requires: jre >= 1.6.0
D: Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 YES (rpmlib provides)
D: Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 YES (rpmlib provides)
D: opening db index /var/lib/rpm/Conflictname rdonly mode=0x0
D: closed db index /var/lib/rpm/Pubkeys
D: closed db index /var/lib/rpm/Depends
D: closed db index /var/lib/rpm/Conflictname
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
error: Failed dependencies:
jre >= 1.6.0 is needed by foo-bar-branch_bar3.4.0_40478-1.noarch
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)
D: 0 0 0 0 1 0 +foo-bar-branch_bar3.4.0_40478-1.noarch
D: May free Score board((nil))
答案 0 :(得分:2)
我不知道另一个包可以提供包。我认为如果是这种情况,那么它仍会出现在“rpm -qa”列表中。
$ rpm -q --whatprovides jre
java-1.6.0-openjdk-1.6.0.0-1.40.1.9.10.el6_1.i686
$ rpm -q --provides java-1.6.0-openjdk | grep jre
jre = 1.6.0
jre-1.6.0 = 1:1.6.0.0-1.40.1.9.10.el6_1
jre-1.6.0-openjdk = 1:1.6.0.0-1.40.1.9.10.el6_1
jre-openjdk = 1:1.6.0.0-1.40.1.9.10.el6_1
答案 1 :(得分:0)
如果要回购,请运行以下命令以标识软件包名称。
yum provides <file name>
例如:yum provides jre