Reputation: 28689
I'm running the following commands on CentOs 8
$ cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)
I start off with a clean and updated yum database:
$ 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!
If I search for the cmake3
package with yum, or attempt to show details, it does not work:
$ 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
If I attempt to install the cmake3
package, it installs the cmake
package
$ 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]:
What is happening here? Why does search
and info
fail, but install
succeed (and install a slightly differently pacakge)?
Upvotes: 1
Views: 1596
Reputation: 3728
Since cmake3
is provided by the cmake
package, that package will be installed by yum install
, since no package with the exact cmake3
name exists:
# 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
A similar example is in the yum
manpage (which in RHEL8 redirects to 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.
Upvotes: 2