rpm -qa
vs yum list installed
: Why certain packages can be found with rpm -qa
only?
問題現(xiàn)象
Python 2.7.5
是存在的。rpm -qa
可以成功查詢,但是 yum list installed
卻沒查到。
[root@CentOS7 centos]# python -V
Python 2.7.5
[root@CentOS7 centos]#
[root@CentOS7 centos]# rpm -qa | grep python-2.7.5
python-2.7.5-58.el7.x86_64
[root@CentOS7 centos]#
[root@CentOS7 centos]# yum list installed | grep python-2.7.5
[root@CentOS7 centos]#
yum list installed 介紹
the package name | version number | the repository nickname |
---|---|---|
audit-libs-python.x86_64 | 2.7.6-3.el7 | @base |
dbus-python.x86_64 | 1.1.1-9.el7 | installed |
libselinux-python.x86_64 | 2.5-11.el7 | @base |
libsemanage-python.x86_64 | 2.5-8.el7 | @base |
libxml2-python.x86_64 | 2.9.1-6.el7_2.3 | installed |
newt-python.x86_64 | 0.52.15-4.el7 | installed |
policycoreutils-python.x86_64 | 2.5-17.1.el7 | @base |
python.x86_64 | 2.7.5-58.el7 | @base |
rpm-python.x86_64 | 4.11.3-25.el7 | @base |
yum list installed
查出結(jié)果如上分三列顯示,可以針對單獨(dú)某列進(jìn)行查詢,比如文章來源:http://www.zghlxwxcb.cn/news/detail-822293.html
[root@user1 ~]# yum list installed | grep 2.7.5
python.x86_64 2.7.5-58.el7 @base
python-libs.x86_64 2.7.5-58.el7 @base
[root@user1 ~]# yum list installed | grep python.x86_64
audit-libs-python.x86_64 2.7.6-3.el7 @base
dbus-python.x86_64 1.1.1-9.el7 installed
libselinux-python.x86_64 2.5-11.el7 @base
libsemanage-python.x86_64 2.5-8.el7 @base
libxml2-python.x86_64 2.9.1-6.el7_2.3 installed
newt-python.x86_64 0.52.15-4.el7 installed
policycoreutils-python.x86_64 2.5-17.1.el7 @base
python.x86_64 2.7.5-58.el7 @base
rpm-python.x86_64 4.11.3-25.el7 @base
yum list installed | grep python-2.7.5 不支持,需要使用特殊結(jié)構(gòu)查詢,這里不展開,可自行查詢
rpm -qa 介紹
[root@user1 ~]# rpm -qa | grep 2.7.5
python-libs-2.7.5-58.el7.x86_64
python-2.7.5-58.el7.x86_64
[root@CentOS7 centos]# rpm -qa | grep python-2.7.5
python-2.7.5-58.el7.x86_64
參考
rpm -qa vs yum list installed: Why certain packages can be found with rpm -qa only?文章來源地址http://www.zghlxwxcb.cn/news/detail-822293.html
到了這里,關(guān)于“rpm -qa“ 和 “yum list installed“ 的區(qū)別的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!