gpt4 book ai didi

cmake - 为什么 yum install 可以工作,但是 yum search 和 yum info 不行?

转载 作者:行者123 更新时间:2023-12-04 19:33:41 27 4
gpt4 key购买 nike

我在 CentOs 8 上运行以下命令

$ cat /etc/redhat-release 
CentOS Linux release 8.2.2004 (Core)
我从一个干净且更新的 yum 数据库开始:
$ yum clean all
46 files removed

$ yum update
CentOS-8 - AppStream 18 MB/s | 5.8 MB 00:00
CentOS-8 - Base 15 MB/s | 2.2 MB 00:00
CentOS-8 - Extras 121 kB/s | 7.9 kB 00:00
CentOS-8 - PowerTools 9.0 MB/s | 1.9 MB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 271 kB/s | 117 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 26 MB/s | 8.0 MB 00:00
yum Dependencies resolved.
Nothing to do.
Complete!
如果我搜索 cmake3用 yum 打包,或者尝试显示详细信息,都不起作用:
$ yum search cmake3
Last metadata expiration check: 0:01:03 ago on Fri 11 Sep 2020 07:47:47 AM UTC.
No matches found.

$ yum info cmake3
Last metadata expiration check: 0:02:24 ago on Fri 11 Sep 2020 07:47:47 AM UTC.
Error: No matching Packages to list
如果我尝试安装 cmake3包,它会安装 cmake包裹
$ yum install cmake3
Last metadata expiration check: 0:22:10 ago on Fri 11 Sep 2020 07:47:47 AM UTC.
Dependencies resolved.
==============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================================================
Installing:
cmake x86_64 3.11.4-7.el8 AppStream 8.1 M
Installing dependencies:
cmake-data noarch 3.11.4-7.el8 AppStream 1.3 M
cmake-filesystem x86_64 3.11.4-7.el8 AppStream 40 k
cmake-rpm-macros noarch 3.11.4-7.el8 AppStream 39 k
libuv x86_64 1:1.23.1-1.el8 AppStream 134 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install 5 Packages

Total download size: 9.7 M
Installed size: 29 M
Is this ok [y/N]:
这里发生了什么?为什么 searchinfo失败,但 install成功(并安装略有不同的包装)?

最佳答案

由于cmake3cmake 提供包,该包将由 yum install 安装, 因为没有确切的 cmake3 的包名称存在:

# yum provides cmake3
cmake-3.11.4-7.el8.x86_64 : Cross-platform make system
Repo : AppStream
Matched from:
Provide : cmake3 = 3.11.4-7.el8
yum 中有一个类似的例子。手册页(在 RHEL8 中重定向到 dnf ):

dnf install vim

DNF will automatically recognize that vim is not a package name, but will look up and install a package that provides vim with all the required dependencies. Note: Package name match has precedence over package provides match.

关于cmake - 为什么 yum install 可以工作,但是 yum search 和 yum info 不行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63843233/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com