现有问题AA>及其解答。
如下所示,repoquery(来自于yum utils包)即使包已安装,也不会为包提供输出。事实上,有问题的包是YumUtils,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 ~]$

最佳答案

我遇到了这个问题,并通过添加选项--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

关于linux - 即使安装了软件包,repoquery也不会为软件包提供任何输出(yum-utils),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28050592/

10-11 04:13