目录
通过yum list 看不到 22 这个版本的openssl
[root@ACN4UOST1 yum.repos.d]# yum list openssl
Last metadata expiration check: 0:02:21 ago on 2023年03月29日 星期三 23时02分51秒.
Installed Packages
openssl.x86_64 1:1.1.1f-13.uel20 @UnionTechOS-Server-20
Available Packages
openssl.x86_64 1:1.1.1f-18.up2.uel20 UnionTechOS-Server-20
openssl.x86_64 1:1.1.1f-18.up2.uel20 UnionTechOS-Server-20-update
openssl.x86_64 1:1.1.1f-18.up2.uel20 UnionTechOS-Server-20-everything
查看http页面内网包,可以找到在update源中有如下更新包:
openssl-1.1.1f-14.up1.uel20.x86_64.rpm
openssl-1.1.1f-15.up1.uel20.x86_64.rpm
openssl-1.1.1f-16.up1.uel20.x86_64.rpm
openssl-1.1.1f-17.up2.uel20.x86_64.rpm
openssl-1.1.1f-18.up2.uel20.x86_64.rpm
openssl-1.1.1f-22.up2.uel20.x86_64.rpm
如果直接通过yum install openssl 更新只可以更新到 18 这个版本
尝试使用指定版本安装的方式:
yum install -y openssl-1.1.1f-22.uel20.x86_64
发现不行,会报一个找不到的错误
这个时候想到有时候不找到某个软件包的 module metadata
## 通过直接安装rpm包的方式
[root@ACN4UOST1 ~]# yum install -y http://10.112.6.253/uos/1050/x86_64/update/Packages/openssl-1.1.1f-22.up2.uel20.x86_64.rpm
Last metadata expiration check: 0:19:22 ago on Wed Mar 29 23:02:51 2023.
openssl-1.1.1f-22.up2.uel20.x86_64.rpm 17 MB/s | 449 kB 00:00
Error:
Problem: package openssl-1:1.1.1f-22.up2.uel20.x86_64 requires openssl-libs(x86-64) = 1:1.1.1f-22.up2.uel20, but none of the providers can be installed
- conflicting requests
- package openssl-libs-1:1.1.1f-22.up2.uel20.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
不能找到openssl最新版本的原因
这里有一个比较关键的信息暴露出来了, is filtered out by modular filtering 。
很容易联想到是不是有module相关的设置导致了,这里不能安装22 版本openssl
fedora有相关module的介绍
相关参考文章链接如下:
所以简单来说,module可以拓展一个rpm repo 如下功能:
1.可以增加额外的包,并且包可以与先有包重名,这些额外的包只是使用了不同的软件源以及构建配置
2.module可以有不同的生命周期,这些包的生命周期可以跟某个发行版的生命周期不同
3.module steams 可以有不同的 安装配置文件,例如 你可以有多个module stream 配置文件,用于配置在安装时使用不同的rpm包组。
一些yum module 常用的命令:
查看yum module 都有哪些
dnf module list
在使用外网源时,可以只看到OS/stable 这个stream被使用了
启用禁用module
yum module disable OS/stable
现在理解只有被启用的stream才可以被yum 安装到
启用update源,并关闭所有的module之后再次查看 openssl 可以看到22 版本了
[root@ACN4UOST1 yum.repos.d]# yum list openssl --showduplicates
Last metadata expiration check: 0:08:15 ago on 2023年03月29日 星期三 23时02分51秒.
Installed Packages
openssl.x86_64 1:1.1.1f-22.up2.uel20 @UnionTechOS-Server-20-update
Available Packages
openssl.x86_64 1:1.1.1f-14.up1.uel20 UnionTechOS-Server-20-update
openssl.x86_64 1:1.1.1f-15.up1.uel20 UnionTechOS-Server-20-update
openssl.x86_64 1:1.1.1f-16.up1.uel20 UnionTechOS-Server-20-update
openssl.x86_64 1:1.1.1f-22.up2.uel20 UnionTechOS-Server-20-update
总结:
[root@ACN4UOST1 ~]# yum module list
Last metadata expiration check: 2:56:22 ago on 2023年03月30日 星期四 05时29分34秒.
UnionTechOS-Server-20-1050
Name Stream Profiles Summary
OS stable [d][e] everything [d] <auto-generated module summary>
UnionTechOS-Server-20-1050-everything
Name Stream Profiles Summary
everything stable [d][x] everything [d] <auto-generated module summary>
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
禁用已经启用的module
yum moudule disable OS/stable
再次查看是否有最新版本的openssl 并安装
[root@ACN4UOST1 ~]# yum list openssl
Last metadata expiration check: 0:13:52 ago on 2023年03月30日 星期四 08时54分18秒.
Installed Packages
openssl.x86_64 1:1.1.1f-13.uel20 @UnionTechOS-Server-20
Available Packages
openssl.x86_64 1:1.1.1f-22.up2.uel20 UnionTechOS-Server-20-update
[root@ACN4UOST1 ~]#
[root@ACN4UOST1 ~]# yum install -y openssl
Last metadata expiration check: 0:14:20 ago on 2023年03月30日 星期四 08时54分18秒.
Package openssl-1:1.1.1f-13.uel20.x86_64 is already installed.
Dependencies resolved.
=========================================================================================================================================================================================
Package Architecture Version Repository Size
=========================================================================================================================================================================================
Upgrading:
openssl x86_64 1:1.1.1f-22.up2.uel20 UnionTechOS-Server-20-update 449 k
openssl-help noarch 1:1.1.1f-22.up2.uel20 UnionTechOS-Server-20-update 3.1 M
openssl-libs x86_64 1:1.1.1f-22.up2.uel20 UnionTechOS-Server-20-update 1.4 M
Enabling module streams:
update stable
Transaction Summary
=========================================================================================================================================================================================
Upgrade 3 Packages
Total download size: 4.9 M
Downloading Packages:
(1/3): openssl-1.1.1f-22.up2.uel20.x86_64.rpm 3.8 MB/s | 449 kB 00:00
(2/3): openssl-libs-1.1.1f-22.up2.uel20.x86_64.rpm 5.6 MB/s | 1.4 MB 00:00
(3/3): openssl-help-1.1.1f-22.up2.uel20.noarch.rpm 7.6 MB/s | 3.1 MB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 12 MB/s | 4.9 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : openssl-libs-1:1.1.1f-22.up2.uel20.x86_64 1/6
Running scriptlet: openssl-libs-1:1.1.1f-22.up2.uel20.x86_64 1/6
Upgrading : openssl-help-1:1.1.1f-22.up2.uel20.noarch 2/6
Upgrading : openssl-1:1.1.1f-22.up2.uel20.x86_64 3/6
Cleanup : openssl-1:1.1.1f-13.uel20.x86_64 4/6
Cleanup : openssl-help-1:1.1.1f-13.uel20.noarch 5/6
Cleanup : openssl-libs-1:1.1.1f-13.uel20.x86_64 6/6
Running scriptlet: openssl-libs-1:1.1.1f-13.uel20.x86_64 6/6
Verifying : openssl-1:1.1.1f-22.up2.uel20.x86_64 1/6
Verifying : openssl-1:1.1.1f-13.uel20.x86_64 2/6
Verifying : openssl-help-1:1.1.1f-22.up2.uel20.noarch 3/6
Verifying : openssl-help-1:1.1.1f-13.uel20.noarch 4/6
Verifying : openssl-libs-1:1.1.1f-22.up2.uel20.x86_64 5/6
Verifying : openssl-libs-1:1.1.1f-13.uel20.x86_64 6/6
Upgraded:
openssl-1:1.1.1f-22.up2.uel20.x86_64 openssl-help-1:1.1.1f-22.up2.uel20.noarch openssl-libs-1:1.1.1f-22.up2.uel20.x86_64
Complete!
[root@ACN4UOST1 ~]#
-- THE END
后记:
其实只要把update源的module也一起启用也可以达到上述更新使用update源的目的。所有的module都关掉,就相当于所有的module都打开了。