yum info vim 没有任何匹配的软件包可列出

yum info vim 没有任何匹配的软件包可列出

为什么不yum info vim返回有关安装在我的 Fedora 34 机器上的 vim 的信息?

[root@oatmeal ~]# yum info vim
Last metadata expiration check: 0:06:02 ago on Wed 08 Sep 2021 08:01:25 EDT.
Error: No matching Packages to list

vim在我的主机上安装并配置:

[root@oatmeal ~]# which vim
/usr/bin/vim
[root@oatmeal ~]# vim --version | head -n 4                                                                                                                                                                                                   
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 06 2021 00:00:00)
Included patches: 1-3404
Modified by <[email protected]>
Compiled by <[email protected]>

有有关其他已安装软件包的信息:

[root@oatmeal ~]# yum info openssl                                                                                                                                                                                                            
Last metadata expiration check: 0:05:49 ago on Wed 08 Sep 2021 08:01:25 EDT.
Installed Packages
Name         : openssl
Epoch        : 1
Version      : 1.1.1l
Release      : 1.fc34
Architecture : x86_64
Size         : 1.1 M
Source       : openssl-1.1.1l-1.fc34.src.rpm
Repository   : @System
From repo    : updates
Summary      : Utilities from the general purpose cryptography library with TLS implementation
URL          : http://www.openssl.org/
License      : OpenSSL and ASL 2.0
Description  : The OpenSSL toolkit provides support for secure communications between
             : machines. OpenSSL includes a certificate management tool and shared
             : libraries which provide various cryptographic algorithms and
             : protocols.

[root@oatmeal ~]# yum info firefox 
Last metadata expiration check: 0:05:56 ago on Wed 08 Sep 2021 08:01:25 EDT.
Installed Packages
Name         : firefox
Version      : 91.0.2
Release      : 1.fc34
Architecture : x86_64
Size         : 253 M
Source       : firefox-91.0.2-1.fc34.src.rpm
Repository   : @System
From repo    : updates
Summary      : Mozilla Firefox Web browser
URL          : https://www.mozilla.org/firefox/
License      : MPLv1.1 or GPLv2+ or LGPLv2+
Description  : Mozilla Firefox is an open-source web browser, designed for standards
             : compliance, performance and portability.

答案1

yum info vim没有显示任何内容的原因是提供的包vim(二进制文件)不是vim,而是vim-enhanced.

rpm -q --whatprovides /usr/bin/vim将告诉您哪个包提供了相关二进制文件,并且yum info vim-enhanced(或dnf info vim-enhanced)将向您显示有关该包的信息。

答案2

如果是基于 rpm 的发行版的更高版本,那么他们就会转向 dnf。如果您认为该软件包已经安装,您可以尝试dnf list --installed vim*。否则,如果您认为该软件包未安装,您可以用“available”替换“installed”```

相关内容