即使安装了软件包,repoquery也没有为软件包提供输出(yum-utils)

时间:2015-01-20 16:37:59

标签: linux centos redhat rpm yum

参考。现有问题How to list the contents of a package using YUM?及其答案。

如下所示,即使安装了软件包,repoquery(来自yum-utils软件包)也不会为软件包提供输出。事实上,有问题的包是yum-utils,来自repoquery来自! (虽然注意它也没有为其他包提供输出 - 显示了一个例子。)

有人知道为什么会这样吗?还有其他人有同样的问题吗?

问题如下......

yum-utils包中的repoquery命令似乎无法正常工作。见下文。安装了yum-utils软件包,然后可以使用repoquery命令,但它没有列出它来自的软件包的内容,尽管它列出了我随机选择的另一个软件包的内容。

(DEV) [jgilmartin@cnmvlmtlb01 ~]$ re
read         readonly     regdbdump    reset        restorecon
readarray    readprofile  reload       resize2fs    restorecond
readelf      reboot       rename       resizecons   return
readlink     refer        renice       restart      rev
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo yum install yum-utils
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.30-30.el6 will be installed
--> Processing Dependency: yum >= 3.2.29-56 for package: yum-utils-1.1.30-30.el6                                                                                                 .noarch
--> Running transaction check
---> Package yum.noarch 0:3.2.29-22.el6 will be updated
---> Package yum.noarch 0:3.2.29-60.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package        Arch        Version             Repository                 Size
================================================================================
Installing:
yum-utils      noarch      1.1.30-30.el6       rhel-x86_64-server-6      110 k
Updating for dependencies:
yum            noarch      3.2.29-60.el6       rhel-x86_64-server-6      1.0 M

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): yum-3.2.29-60.el6.noarch.rpm                      | 1.0 MB     00:00
(2/2): yum-utils-1.1.30-30.el6.noarch.rpm                | 110 kB     00:00
--------------------------------------------------------------------------------
Total                                           619 kB/s | 1.1 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : yum-3.2.29-60.el6.noarch                                     1/3
  Installing : yum-utils-1.1.30-30.el6.noarch                               2/3
  Cleanup    : yum-3.2.29-22.el6.noarch                                     3/3
Installed products updated.

Installed:
  yum-utils.noarch 0:1.1.30-30.el6

Dependency Updated:
  yum.noarch 0:3.2.29-60.el6

Complete!
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ repo
repoclosure  repo-graph   repoquery    reposync
repodiff     repomanage   repo-rss     repotrack
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo repoquery --list freeradius
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo repoquery --list yum-utils   # NOTE NO OUTPUT HERE
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo rpm -qa | head
[sudo] password for jgilmartin:
ruby-libs-1.8.7.352-10.el6_4.x86_64
basesystem-10.0-4.el6.noarch
ruby-shadow-1.4.1-13.el6.x86_64
openssh-clients-5.3p1-94.el6.x86_64
s3cmd-1.0.1-1.el6.noarch
info-4.13a-8.el6.x86_64
procmail-3.22-25.1.el6.x86_64
libcom_err-1.41.12-11.el6.x86_64
dbus-1.2.24-7.el6_3.x86_64
libsepol-2.0.41-4.el6.x86_64
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo repoquery --list s3cmd | head   # WORKS FOR THIS PACKAGE
/usr/bin/s3cmd
/usr/lib/python2.6/site-packages/S3/ACL.py
/usr/lib/python2.6/site-packages/S3/ACL.pyc
/usr/lib/python2.6/site-packages/S3/AccessLog.py
/usr/lib/python2.6/site-packages/S3/AccessLog.pyc
/usr/lib/python2.6/site-packages/S3/BidirMap.py
/usr/lib/python2.6/site-packages/S3/BidirMap.pyc
/usr/lib/python2.6/site-packages/S3/CloudFront.py
/usr/lib/python2.6/site-packages/S3/CloudFront.pyc
/usr/lib/python2.6/site-packages/S3/Config.py
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo rpm -ql yum-utils | head   # rpm -ql WORKS FOR THE PACKAGE
/etc/bash_completion.d
/etc/bash_completion.d/yum-utils.bash
/usr/bin/debuginfo-install
/usr/bin/find-repos-of-install
/usr/bin/needs-restarting
/usr/bin/package-cleanup
/usr/bin/repo-graph
/usr/bin/repo-rss
/usr/bin/repoclosure
/usr/bin/repodiff
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ uname -a
Linux cnmvlmtlb01 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
(DEV) [jgilmartin@cnmvlmtlb01 ~]$

1 个答案:

答案 0 :(得分:1)

我遇到了这个问题并通过添加选项--pkgnarrow=installed解决了这个问题。

我怀疑repoquery在这方面有点小问题。我发现即使安装了一些包也会出现,而其他包则不会,除非我添加了pkgnarrow选项。

您也可以使用--pkgnarrow=all

示例:

$ sudo repoquery --repoid ix-stable boost
$ sudo repoquery --repoid ix-stable --pkgnarrow=all boost
boost-0:1.41.0-17.el6_4.x86_64