glibc升级中遇到的小问题

Posted 涛子GE哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了glibc升级中遇到的小问题相关的知识,希望对你有一定的参考价值。

线上用的glibc-2.17-78存在漏洞,需要升级到>glibc-2.17-106版本,yum仓库最新为196版本,直接使用yum update升级:

[root@192.168.0.1 batchuser]#yum -y update glibc
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
程序 yum-complete-transaction 在 yum-utils 软件包中。
--> 正在检查事务
---> 软件包 glibc.x86_64.0.2.17-78.el7 将被 升级
--> 正在处理依赖关系 glibc = 2.17-78.el7,它被软件包 glibc-common-2.17-78.el7.x86_64 需要
---> 软件包 glibc.x86_64.0.2.17-196.el7 将被 更新
--> 解决依赖关系完成
错误:软件包:glibc-common-2.17-78.el7.x86_64 (@anaconda)
          需要:glibc = 2.17-78.el7
          正在删除: glibc-2.17-78.el7.x86_64 (@anaconda)
              glibc = 2.17-78.el7
          更新,由: glibc-2.17-196.el7.x86_64 (CTyueme-epel)
              glibc = 2.17-196.el7
 您可以尝试添加 --skip-broken 选项来解决该问题
** 发现 3 个已存在的 RPM 数据库问题, 'yum check' 输出如下:
glibc-common-2.17-196.el7.x86_64 是 glibc-common-2.17-78.el7.x86_64 的副本
glibc-common-2.17-196.el7.x86_64 有缺少的需求 glibc = ('0', '2.17', '196.el7')
libgcc-4.8.5-16.el7.x86_64 是 libgcc-4.8.3-9.el7.x86_64 的副本

查看当前服务器已安装的glibc包,发现glibc-common有新旧两个版本,将新版本删除

[root@192.168.0.1 batchuser]#rpm -qa | grep glibc
glibc-2.17-78.el7.x86_64
glibc-common-2.17-196.el7.x86_64
glibc-common-2.17-78.el7.x86_64

[root@192.168.0.1 batchuser]#yum remove glibc-common-2.17-196.el7.x86_64
已加载插件:fastestmirror
正在解决依赖关系
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
程序 yum-complete-transaction 在 yum-utils 软件包中。
--> 正在检查事务
---> 软件包 glibc-common.x86_64.0.2.17-196.el7 将被 删除
--> 解决依赖关系完成

依赖关系解决

==================================================================================================================================================
 Package                              架构                           版本                                 源                                 大小
==================================================================================================================================================
正在删除:
 glibc-common                         x86_64                         2.17-196.el7                         installed                         115 M

事务概要
==================================================================================================================================================
移除  1 软件包

安装大小:115 M
是否继续?[y/N]:y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在删除    : glibc-common-2.17-196.el7.x86_64                                                                                              1/1 
  验证中      : glibc-common-2.17-196.el7.x86_64                                                                                              1/1 

删除:
  glibc-common.x86_64 0:2.17-196.el7                                                                                                              

完毕!

查看并升级

[root@192.168.0.1 batchuser]#rpm -qa | grep glibc
glibc-2.17-78.el7.x86_64
glibc-common-2.17-78.el7.x86_64

[root@192.168.0.1 batchuser]#yum update -y glibc
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
程序 yum-complete-transaction 在 yum-utils 软件包中。
--> 正在检查事务
---> 软件包 glibc.x86_64.0.2.17-78.el7 将被 升级
--> 正在处理依赖关系 glibc = 2.17-78.el7,它被软件包 glibc-common-2.17-78.el7.x86_64 需要
---> 软件包 glibc.x86_64.0.2.17-196.el7 将被 更新
--> 正在检查事务
---> 软件包 glibc-common.x86_64.0.2.17-78.el7 将被 升级
---> 软件包 glibc-common.x86_64.0.2.17-196.el7 将被 更新
--> 解决依赖关系完成

依赖关系解决

==================================================================================================================================================
 Package                             架构                          版本                                 源                                   大小
==================================================================================================================================================
正在更新:
 glibc                               x86_64                        2.17-196.el7                         CTyueme-epel                        3.6 M
为依赖而更新:
 glibc-common                        x86_64                        2.17-196.el7                         CTyueme-epel                         11 M

事务概要
==================================================================================================================================================
升级  1 软件包 (+1 依赖软件包)

总下载量:15 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): glibc-common-2.17-196.el7.x86_64.rpm                                                                                |  11 MB  00:00:02     
(2/2): glibc-2.17-196.el7.x86_64.rpm                                                                                       | 3.6 MB  00:00:03     
--------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                              3.9 MB/s |  15 MB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在更新    : glibc-2.17-196.el7.x86_64                                                                                                     1/4 
警告:/etc/nsswitch.conf 已建立为 /etc/nsswitch.conf.rpmnew 
  正在更新    : glibc-common-2.17-196.el7.x86_64                                                                                              2/4 
  清理        : glibc-2.17-78.el7.x86_64                                                                                                      3/4 
  清理        : glibc-common-2.17-78.el7.x86_64                                                                                               4/4 
  验证中      : glibc-common-2.17-196.el7.x86_64                                                                                              1/4 
  验证中      : glibc-2.17-196.el7.x86_64                                                                                                     2/4 
  验证中      : glibc-2.17-78.el7.x86_64                                                                                                      3/4 
  验证中      : glibc-common-2.17-78.el7.x86_64                                                                                               4/4 

更新完毕:
  glibc.x86_64 0:2.17-196.el7                                                                                                                     

作为依赖被升级:
  glibc-common.x86_64 0:2.17-196.el7                                                                                                              

完毕!

查看,已升级到196版本

[root@192.168.0.1 batchuser]#rpm -qa | grep glibc
glibc-common-2.17-196.el7.x86_64
glibc-2.17-196.el7.x86_64

以上是关于glibc升级中遇到的小问题的主要内容,如果未能解决你的问题,请参考以下文章

gcc glibc升级

分享Centos6.5升级glibc过程

使用腾讯互动直播 遇到的坑 'GLIBC_2.14' not found 问题解决

Centos6.5升级glibc解决“libc.so.6: version GLIBC_2.14 not found”报错问题

glibc升级GLIBC_2.14,一定不要mv libc.so.6 libc.so.6_bak……

glibc升级导致系统段错误问题解决方案