大网数据广告活动
服务器运维问答

How to fix dependency issue with partially completed yum update of glibc

· 52CE 我爱测

I attempted to update my production web server this morning (t2 running Amazon Linux) but it failed because I ran out of RAM (php-fpm had it all). I stopped php-fpm to free up some RAM, but the yum update won't complete. The serv…

问题原文

原帖链接 · Tim · CC BY-SA 3.0

I attempted to update my production web server this morning (t2 running Amazon Linux) but it failed because I ran out of RAM (php-fpm had it all). I stopped php-fpm to free up some RAM, but the yum update won't complete. The server is running ok, but I'd like to clean up this problem.

# yum update
Resolving Dependencies
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-106.168.amzn1 will be updated
--> Processing Dependency: glibc-headers = 2.17-106.168.amzn1 for package: glibc-devel-2.17-106.168.amzn1.x86_64
---> Package glibc-headers.x86_64 0:2.17-157.169.amzn1 will be an update
--> Finished Dependency Resolution
Error: Package: glibc-devel-2.17-106.168.amzn1.x86_64 (@amzn-main)
       Requires: glibc-headers = 2.17-106.168.amzn1
       Removing: glibc-headers-2.17-106.168.amzn1.x86_64 (@amzn-main)
           glibc-headers = 2.17-106.168.amzn1
       Updated By: glibc-headers-2.17-157.169.amzn1.x86_64 (amzn-updates)
           glibc-headers = 2.17-157.169.amzn1
You could try using --skip-broken to work around the problem
** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows:
glibc-devel-2.17-106.168.amzn1.x86_64 has missing requires of glibc(x86-64) = ('0', '2.17', '106.168.amzn1')
glibc-devel-2.17-157.169.amzn1.x86_64 is a duplicate with glibc-devel-2.17-106.168.amzn1.x86_64
glibc-devel-2.17-157.169.amzn1.x86_64 has missing requires of glibc-headers = ('0', '2.17', '157.169.amzn1')
glibc-headers-2.17-106.168.amzn1.x86_64 has missing requires of glibc(x86-64) = ('0', '2.17', '106.168.amzn1')
subversion-1.9.4-2.55.amzn1.x86_64 has missing requires of subversion-libs(x86-64) = ('0', '1.9.4', '2.55.amzn1')
subversion-1.9.5-1.56.amzn1.x86_64 is a duplicate with subversion-1.9.4-2.55.amzn1.x86_64

Here's the glibc packages that are installed

# rpm -qa | grep glibc
glibc-devel-2.17-157.169.amzn1.x86_64
glibc-devel-2.17-106.168.amzn1.x86_64
glibc-common-2.17-157.169.amzn1.x86_64
glibc-headers-2.17-106.168.amzn1.x86_64
glibc-2.17-157.169.amzn1.x86_64

One problem appears to be two different versions of glibc-devel are installed. It also looks like parts of glibc are on version 106 and others are on version 157.

I rebooted the server, which as expected made no difference, but it was worth a shot. I ran the following, with no effect

yum-complete-transaction
yum-complete-transaction --cleanup-only
yum clean all

In the past I've had similar problems but with less critical packages. I just remove them all and them install them again. I don't believe this is possible with glibc as so many things depend on it.

I've looked on the Centos forums and one option seems to be downgrading some packages to downgrade some packages, but I don't know if there's a better option. Since this is my production server I would appreciate some advice before I attempt this. If this is a good approach which packages should I downgrade? What do I do after I've downgraded, a regular yum update?

Note that I have regular backups and can restore from a recent backup if required, but I'd prefer not to as I'd have to redo some SSL certificate work that was a bit tricky. I plan to move to Ubuntu and use CloudFormation to build the server in the future, so if the server fails I can simply create another, but that's a future task.

已采纳解答

原帖链接 · Tim · CC BY-SA 3.0

Thanks for the suggestion of using rollback. I tried it but it didn't roll things back properly.

I created another instance of the VM and tried to do things manually. Noting from above that I had two versions of glibc-devel I did the following

yum remove glibc-devel-2.17-157.169.amzn1.x86_64
yum update glibc-devel-2.17-106.168.amzn1.x86_64

At that point I did a "yum check" and it told me there was a problem with subversion as well.

yum remove subversion
yum install subversion
yum clean all
yum check

This appears to have resolved the issue.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-02-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。