linux - yum安装包时提示libstdc++版本冲突

 陈爱梅志杰力凯 发布于 2022-10-31 07:20

我本来想安装certbot,结果在运行完./certbot-auto certonly后会使用yum来初始化安装若干的包,不过运行一段时间后,就报错了:

Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:
       
         1. You have an upgrade for libstdc++ which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of libstdc++ of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude libstdc++.otherarch ... this should give you an error
            message showing the root cause of the problem.
       
         2. You have multiple architectures of libstdc++ installed, but
            yum can only see an upgrade for one of those arcitectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.
       
         3. You have duplicate versions of libstdc++ installed already.
            You can use "yum check" to get yum show these errors.
       
       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).
       
       Protected multilib versions: libstdc++-4.8.2-8.el6.x86_64 != libstdc++-4.4.7-17.el6.i686
Error: Protected multilib versions: libstdc++-devel-4.8.2-8.el6.x86_64 != libstdc++-devel-4.4.7-17.el6.i686
Error: Protected multilib versions: libgcc-4.8.2-8.el6.x86_64 != libgcc-4.4.7-17.el6.i686
Could not install OS dependencies. Aborting bootstrap!

然后我运行rpm -qa | grep libstdc后输出:

compat-libstdc++-33-3.2.3-69.el6.i686
libstdc++-devel-4.4.7-17.el6.i686
libstdc++-devel-4.4.7-17.el6.x86_64
libstdc++-4.4.7-17.el6.x86_64
libstdc++-4.4.7-17.el6.i686
compat-libstdc++-296-2.96-144.el6.i686
compat-libstdc++-33-3.2.3-69.el6.x86_6

我感觉这几个compat开头的包很可疑,于是乎把他们都删除了,但是回来接着运行certbot-auto还是报同样的错误。网上有人说运行下面命令可以解决冲突:

yum downgrade libgomp
yum downgrade libstdc++
yum downgrade libgcc
yum downgrade cpp

但是我运行完成后,依然没有效果。

certbot-auto是一个脚本文件,里面的代码比较长,这个脚本里面每个yum命令后面追加--setopt=protected_multilib=false我认为是可以的,但是我不想这么解决,还是想找到一个釜底抽薪的解决方案。
我的操作系统是centos 6.8

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有