解决centos安装mysql依赖出错问题提示保护多库版本

😂 这篇文章最后更新于2064天前,您需要注意相关的内容是否还可用。

当执行以下命令安装依赖时候:

yum -y install libaio.so.1 libgcc_s.so.1 libstdc++.so.6

时候出现了如下错误:

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

 * base: centos.ustc.edu.cn

 * extras: centos.ustc.edu.cn

 * updates: mirrors.cn99.com

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package libaio.i686 0:0.3.107-10.el6 will be installed

---> Package libgcc.i686 0:4.4.7-23.el6 will be installed

---> Package libstdc++.i686 0:4.4.7-23.el6 will be installed

--> Finished Dependency Resolution

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 libgcc which is missing some

            dependency that another package requires. Yum is trying to

            solve this by installing an older version of libgcc 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 libgcc.otherarch ... this should give you an error

            message showing the root cause of the problem.

       

         2. You have multiple architectures of libgcc 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 libgcc 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: libgcc-4.4.7-23.el6.i686 != libgcc-4.4.7-4.el6.x86_64

 You could try using --skip-broken to work around the problem

** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows:

1:libreoffice-core-4.0.4.2-9.el6.x86_64 has missing requires of libjawt.so()(64bit)

1:libreoffice-core-4.0.4.2-9.el6.x86_64 has missing requires of libjawt.so(SUNWprivate_1.1)(64bit)

1:libreoffice-ure-4.0.4.2-9.el6.x86_64 has missing requires of jre >= ('0', '1.5.0', None)

2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16()(64bit)

2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)

2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of mysql-libs


解决方法也很简单,用下列代码执行安装即可:

yum install --setopt=protected_multilib=false libaio.so.1 libgcc_s.so.1 libstdc++.so.6