317.el7.x86_64 (CentOS7.9)问题解决
问题描述
使用yum更新软件包的时候出现错误:
# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cloud.aliyuncs.com
* extras: mirrors.cloud.aliyuncs.com
* updates: mirrors.cloud.aliyuncs.com
base | 3.6 kB 00:00:00
docker-ce-stable | 3.5 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
updates/x86_64/primary_db | 12 MB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package ca-certificates.noarch 0:2020.2.41-70.0.el7_8 will be updated
---> Package ca-certificates.noarch 0:2021.2.50-72.el7_9 will be an update
---> Package glibc-headers.x86_64 0:2.17-317.el7 will be updated
--> Processing Dependency: glibc-headers = 2.17-317.el7 for package: glibc-devel-2.17-317.el7.x86_64
---> Package glibc-headers.x86_64 0:2.17-325.el7_9 will be an update
---> Package grub2-tools.x86_64 1:2.02-0.87.el7.centos.6 will be updated
---> Package grub2-tools.x86_64 1:2.02-0.87.el7.centos.7 will be an update
---> Package httpd.x86_64 0:2.4.6-97.el7.centos will be updated
---> Package httpd.x86_64 0:2.4.6-97.el7.centos.1 will be an update
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos will be updated
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.1 will be an update
---> Package nscd.x86_64 0:2.17-323.el7_9 will be updated
---> Package nscd.x86_64 0:2.17-325.el7_9 will be an update
--> Finished Dependency Resolution
Error: Package: glibc-devel-2.17-317.el7.x86_64 (@base)
Requires: glibc-headers = 2.17-317.el7
Removing: glibc-headers-2.17-317.el7.x86_64 (@base)
glibc-headers = 2.17-317.el7
Updated By: glibc-headers-2.17-325.el7_9.x86_64 (updates)
glibc-headers = 2.17-325.el7_9
Available: glibc-headers-2.17-322.el7_9.x86_64 (updates)
glibc-headers = 2.17-322.el7_9
Available: glibc-headers-2.17-323.el7_9.x86_64 (updates)
glibc-headers = 2.17-323.el7_9
Available: glibc-headers-2.17-324.el7_9.x86_64 (updates)
glibc-headers = 2.17-324.el7_9
You could try using --skip-broken to work around the problem
** Found 27 pre-existing rpmdb problem(s), 'yum check' output follows:
7:device-mapper-1.02.170-6.el7_9.3.x86_64 has missing requires of device-mapper-libs = ('7', '1.02.170', '6.el7_9.3')
7:device-mapper-1.02.170-6.el7_9.4.x86_64 is a duplicate with 7:device-mapper-1.02.170-6.el7_9.3.x86_64
7:device-mapper-1.02.170-6.el7_9.4.x86_64 has missing requires of device-mapper-libs = ('7', '1.02.170', '6.el7_9.4')
7:device-mapper-1.02.170-6.el7_9.5.x86_64 is a duplicate with 7:device-mapper-1.02.170-6.el7_9.4.x86_64
dnsmasq-2.76-17.el7_9.3.x86_64 is a duplicate with dnsmasq-2.76-16.el7_9.1.x86_64
firewalld-0.6.3-12.el7.noarch has missing requires of firewalld-filesystem = ('0', '0.6.3', '12.el7')
firewalld-0.6.3-12.el7.noarch has missing requires of python-firewall = ('0', '0.6.3', '12.el7')
firewalld-0.6.3-13.el7_9.noarch is a duplicate with firewalld-0.6.3-12.el7.noarch
glibc-devel-2.17-317.el7.x86_64 has missing requires of glibc = ('0', '2.17', '317.el7')
glibc-devel-2.17-323.el7_9.x86_64 is a duplicate with glibc-devel-2.17-317.el7.x86_64
glibc-devel-2.17-323.el7_9.x86_64 has missing requires of glibc = ('0', '2.17', '323.el7_9')
glibc-devel-2.17-323.el7_9.x86_64 has missing requires of glibc-headers = ('0', '2.17', '323.el7_9')
glibc-devel-2.17-325.el7_9.x86_64 is a duplicate with glibc-devel-2.17-323.el7_9.x86_64
glibc-devel-2.17-325.el7_9.x86_64 has missing requires of glibc-headers = ('0', '2.17', '325.el7_9')
glibc-headers-2.17-317.el7.x86_64 has missing requires of glibc = ('0', '2.17', '317.el7')
1:grub2-pc-2.02-0.87.el7.centos.7.x86_64 has missing requires of grub2-tools = ('1', '2.02', '0.87.el7.centos.7')
1:grub2-tools-2.02-0.87.el7.centos.6.x86_64 has missing requires of grub2-common = ('1', '2.02', '0.87.el7.centos.6')
1:grub2-tools-2.02-0.87.el7.centos.6.x86_64 has missing requires of grub2-tools-minimal = ('1', '2.02', '0.87.el7.centos.6')
1:grub2-tools-extra-2.02-0.87.el7.centos.7.x86_64 has missing requires of grub2-tools = ('1', '2.02', '0.87.el7.centos.7')
kexec-tools-2.0.15-51.el7_9.3.x86_64 is a duplicate with kexec-tools-2.0.15-51.el7_9.1.x86_64
2:microcode_ctl-2.1-73.8.el7_9.x86_64 is a duplicate with 2:microcode_ctl-2.1-73.4.el7_9.x86_64
2:microcode_ctl-2.1-73.11.el7_9.x86_64 is a duplicate with 2:microcode_ctl-2.1-73.8.el7_9.x86_64
nettle-2.7.1-9.el7_9.x86_64 is a duplicate with nettle-2.7.1-8.el7.x86_64
nscd-2.17-323.el7_9.x86_64 has missing requires of glibc = ('0', '2.17', '323.el7_9')
rsyslog-8.24.0-57.el7_9.1.x86_64 is a duplicate with rsyslog-8.24.0-57.el7_9.x86_64
tuned-2.11.0-11.el7_9.noarch is a duplicate with tuned-2.11.0-10.el7.noarch
1:wpa_supplicant-2.6-12.el7_9.2.x86_64 is a duplicate with 1:wpa_supplicant-2.6-12.el7.x86_64
查了一些资料,发现是glibc的版本不兼容的问题,只需要安装最新版本的就好了
解决方案
删除低版本
yum remove -y glibc-headers-2.17-317.el7.x86_64 glibc-devel-2.17-317.el7.x86_64 glibc-devel-2.17-323.el7_9.x86_64 glibc-headers-2.17-323.el7_9.x86_64
# yum remove -y glibc-headers-2.17-317.el7.x86_64 glibc-devel-2.17-317.el7.x86_64 glibc-devel-2.17-323.el7_9.x86_64 glibc-headers-2.17-323.el7_9.x86_64
Loaded plugins: fastestmirror
No Match for argument: glibc-devel-2.17-317.el7.x86_64
No Match for argument: glibc-headers-2.17-323.el7_9.x86_64
Resolving Dependencies
--> Running transaction check
---> Package glibc-devel.x86_64 0:2.17-323.el7_9 will be erased
---> Package glibc-headers.x86_64 0:2.17-317.el7 will be erased
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-325.el7_9.x86_64
--> Running transaction check
---> Package glibc-devel.x86_64 0:2.17-325.el7_9 will be erased
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-44.el7.x86_64
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-44.el7 will be erased
--> Processing Dependency: gcc for package: systemtap-devel-4.0-13.el7.x86_64
--> Processing Dependency: gcc = 4.8.5-44.el7 for package: gcc-c++-4.8.5-44.el7.x86_64
--> Processing Dependency: gcc for package: systemtap-devel-4.0-13.el7.x86_64
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.8.5-44.el7 will be erased
---> Package systemtap-devel.x86_64 0:4.0-13.el7 will be erased
--> Processing Dependency: systemtap-devel = 4.0-13.el7 for package: systemtap-4.0-13.el7.x86_64
--> Running transaction check
---> Package systemtap.x86_64 0:4.0-13.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================
Removing:
glibc-devel x86_64 2.17-323.el7_9 @updates 1.0 M
glibc-headers x86_64 2.17-317.el7 @base 2.2 M
Removing for dependencies:
gcc x86_64 4.8.5-44.el7 @base 37 M
gcc-c++ x86_64 4.8.5-44.el7 @base 16 M
glibc-devel x86_64 2.17-325.el7_9 @updates 1.0 M
systemtap x86_64 4.0-13.el7 @base 0.0
systemtap-devel x86_64 4.0-13.el7 @base 8.2 M
Transaction Summary
=================================================================================================================================================
Remove 2 Packages (+5 Dependent packages)
Installed size: 66 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : glibc-devel.x86_64 1/7
Erasing : systemtap-4.0-13.el7.x86_64 2/7
Erasing : systemtap-devel-4.0-13.el7.x86_64 3/7
Erasing : gcc-c++-4.8.5-44.el7.x86_64 4/7
Erasing : gcc-4.8.5-44.el7.x86_64 5/7
Erasing : glibc-devel.x86_64 6/7
Erasing : glibc-headers-2.17-317.el7.x86_64 7/7
Verifying : gcc-c++-4.8.5-44.el7.x86_64 1/7
Verifying : systemtap-4.0-13.el7.x86_64 2/7
Verifying : glibc-devel-2.17-325.el7_9.x86_64 3/7
Verifying : systemtap-devel-4.0-13.el7.x86_64 4/7
Verifying : gcc-4.8.5-44.el7.x86_64 5/7
Verifying : glibc-headers-2.17-317.el7.x86_64 6/7
Verifying : glibc-devel-2.17-323.el7_9.x86_64 7/7
Removed:
glibc-devel.x86_64 0:2.17-323.el7_9 glibc-headers.x86_64 0:2.17-317.el7
Dependency Removed:
gcc.x86_64 0:4.8.5-44.el7 gcc-c++.x86_64 0:4.8.5-44.el7 glibc-devel.x86_64 0:2.17-325.el7_9 systemtap.x86_64 0:4.0-13.el7
systemtap-devel.x86_64 0:4.0-13.el7
Complete!
安装最新版
yum install -y gcc gcc-c++ glibc make autoconf openssl-devel
# yum install -y gcc gcc-c++ glibc make autoconf openssl-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cloud.aliyuncs.com
* extras: mirrors.cloud.aliyuncs.com
* updates: mirrors.cloud.aliyuncs.com
Package glibc-2.17-325.el7_9.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Package autoconf-2.69-11.el7.noarch already installed and latest version
Package 1:openssl-devel-1.0.2k-22.el7_9.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-44.el7 will be installed
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-44.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-44.el7 will be installed
--> Running transaction check
---> Package glibc-devel.x86_64 0:2.17-325.el7_9 will be installed
--> Processing Dependency: glibc-headers = 2.17-325.el7_9 for package: glibc-devel-2.17-325.el7_9.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-325.el7_9.x86_64
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-325.el7_9 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================
Installing:
gcc x86_64 4.8.5-44.el7 base 16 M
gcc-c++ x86_64 4.8.5-44.el7 base 7.2 M
Installing for dependencies:
glibc-devel x86_64 2.17-325.el7_9 updates 1.1 M
glibc-headers x86_64 2.17-325.el7_9 updates 691 k
Transaction Summary
=================================================================================================================================================
Install 2 Packages (+2 Dependent packages)
Total size: 25 M
Total download size: 23 M
Installed size: 57 M
Downloading packages:
(1/2): gcc-4.8.5-44.el7.x86_64.rpm | 16 MB 00:00:00
(2/2): gcc-c++-4.8.5-44.el7.x86_64.rpm | 7.2 MB 00:00:00
-------------------------------------------------------------------------------------------------------------------------------------------------
Total 34 MB/s | 23 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : glibc-headers-2.17-325.el7_9.x86_64 1/4
Installing : glibc-devel-2.17-325.el7_9.x86_64 2/4
Installing : gcc-4.8.5-44.el7.x86_64 3/4
Installing : gcc-c++-4.8.5-44.el7.x86_64 4/4
Verifying : gcc-4.8.5-44.el7.x86_64 1/4
Verifying : gcc-c++-4.8.5-44.el7.x86_64 2/4
Verifying : glibc-headers-2.17-325.el7_9.x86_64 3/4
Verifying : glibc-devel-2.17-325.el7_9.x86_64 4/4
Installed:
gcc.x86_64 0:4.8.5-44.el7 gcc-c++.x86_64 0:4.8.5-44.el7
Dependency Installed:
glibc-devel.x86_64 0:2.17-325.el7_9 glibc-headers.x86_64 0:2.17-325.el7_9
Complete!
[root@izj6cat8fph52exxzedaf7z ~]#
文章评论