2022年5月21日 星期六

[研究] yum -y install epel-release 可能要執行2次 (CentOS Stream 8)

[研究] yum -y install epel-release 可能要執行2次 (CentOS Stream 8)

2022-05-21

直接看畫面就知道,兩次安裝的東西版本可能不同。有時候需要靠 epel-release 安裝的套件,是在較新的 epel 才提供,所以安裝一次不保險。

[user1@localhost ~]$ su root
Password: 
[root@localhost user1]# cd
[root@localhost ~]# yum -y install epel-release
CentOS Stream 8 - AppStream                                                    5.6 MB/s |  22 MB     00:03    
CentOS Stream 8 - BaseOS                                                1.5 MB/s |  22 MB     00:14     
CentOSCentOS Stream 8 - Extras                                                       11 kB/s |  18 kB     00:01    
CentOS Stream 8 - Extras common packages                                      6.5 kB/s | 4.3 kB     00:00    
Dependencies resolved.
==============================================================================================================
 Package                      Architecture           Version                     Repository              Size
==============================================================================================================
Installing:
 epel-release                 noarch                 8-11.el8                    extras                  24 k

Transaction Summary
==============================================================================================================
Install  1 Package

Total download size: 24 k
Installed size: 35 k
Downloading Packages:
epel-release-8-11.el8.noarch.rpm                                               24 kB/s |  24 kB     00:00    
--------------------------------------------------------------------------------------------------------------
Total                                                                         9.7 kB/s |  24 kB     00:02     
CentOS Stream 8 - Extras                                                      1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x8483C65D:
 Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                      1/1 
  Installing       : epel-release-8-11.el8.noarch                                                         1/1 
  Running scriptlet: epel-release-8-11.el8.noarch                                                         1/1 
  Verifying        : epel-release-8-11.el8.noarch                                                         1/1 

Installed:
  epel-release-8-11.el8.noarch                                                                                

Complete!
[root@localhost ~]# yum -y install epel-release
Extra Packages for Enterprise Linux 8 - x86_64                                1.6 MB/s |  11 MB     00:07    
Extra Packages for Enterprise Linux Modular 8 - x86_64                        203 kB/s | 1.0 MB     00:05    
Last metadata expiration check: 0:00:02 ago on Fri 20 May 2022 09:12:28 PM EDT.
Package epel-release-8-11.el8.noarch is already installed.
Dependencies resolved.
==============================================================================================================
 Package                           Architecture           Version                  Repository            Size
==============================================================================================================
Upgrading:
 epel-release                      noarch                 8-15.el8                 epel                  23 k
Installing weak dependencies:
 epel-next-release                 noarch                 8-15.el8                 epel                  10 k

Transaction Summary
==============================================================================================================
Install  1 Package
Upgrade  1 Package

Total download size: 33 k
Downloading Packages:
(1/2): epel-next-release-8-15.el8.noarch.rpm                                   41 kB/s |  10 kB     00:00    
(2/2): epel-release-8-15.el8.noarch.rpm                                        69 kB/s |  23 kB     00:00    
--------------------------------------------------------------------------------------------------------------
Total                                                                          33 kB/s |  33 kB     00:01     
Extra Packages for Enterprise Linux 8 - x86_64                                1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x2F86D6A1:
 Userid     : "Fedora EPEL (8) <epel@fedoraproject.org>"
 Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                      1/1 
  Running scriptlet: epel-release-8-15.el8.noarch                                                         1/1 
  Upgrading        : epel-release-8-15.el8.noarch                                                         1/3 
  Installing       : epel-next-release-8-15.el8.noarch                                                    2/3 
  Cleanup          : epel-release-8-11.el8.noarch                                                         3/3 
  Running scriptlet: epel-release-8-11.el8.noarch                                                         3/3 
  Verifying        : epel-next-release-8-15.el8.noarch                                                    1/3 
  Verifying        : epel-release-8-15.el8.noarch                                                         2/3 
  Verifying        : epel-release-8-11.el8.noarch                                                         3/3 

Upgraded:
  epel-release-8-15.el8.noarch                                                                                
Installed:
  epel-next-release-8-15.el8.noarch                                                                           

Complete!
[root@localhost ~]# 

[root@localhost ~]# yum -y install epel-release
Last metadata expiration check: 0:42:51 ago on Fri 20 May 2022 09:17:35 PM EDT.
Package epel-release-8-15.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@localhost ~]# 

會否需要執行到第三次?機率很低。

會否執行第一次就,不需要第二次,已經是最新的,也有可能。

比較準確的做法是更新到說已經安裝了為止。

(完)

相關

[研究] yum -y install epel-release 可能要執行2次 (CentOS Stream 9)
https://shaurong.blogspot.com/2022/05/yum-y-install-epel-release-2-centos_22.html

[研究] yum -y install epel-release 可能要執行2次 (CentOS Stream 8)
https://shaurong.blogspot.com/2022/05/yum-y-install-epel-release-2-centos.html

沒有留言:

張貼留言