CentOS7下安装ModSecrity依赖rpm包问题解决过程

2020-04-27  本文已影响0人  小浪崇礼

CentOS7下安装ModSecrity依赖rpm包,发现对应rpm版本冲突,具体现象如下:

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

            dependency that another package requires. Yum is trying to

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

            message showing the root cause of the problem.

        2. You have multiple architectures of krb5-libs installed, but

            yum can only see an upgrade for one of those architectures.

            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 krb5-libs 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: krb5-libs-1.15.1-37.el7_6.i686 != krb5-libs-1.15.1-37.el7_7.2.x86_64

Error: Protected multilib versions: libcurl-7.29.0-54.el7.i686 != libcurl-7.29.0-54.el7_7.1.x86_64

上述的原因在网上也查了,给出得原因是多个库共存冲突了,然后根据网上的操作方法并没有很好的解决问题,然后查到一篇外文 https://serverfault.com/questions/745637/centos-yum-install-fails-protected-multilib-versions-problems-found-libsel

得到了启发,如是有了下面的操作

完全删除/etc/yum.repos.d/目录下面的所有repo文件,重新下载阿里云的repo文件

wget -O /etc/yum.repos.d/Centos-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all

yum makecache

上述完成之后,开始安装Mod_Security对应的依赖包

yum install -y readline-devel curl-devel gcc gcc-c++ python-devel yajl-devel

直接成功了

Installed:

  gcc.x86_64 0:4.8.5-39.el7      gcc-c++.x86_64 0:4.8.5-39.el7      libcurl-devel.x86_64 0:7.29.0-54.el7_7.2      python-devel.x86_64 0:2.7.5-86.el7      readline-devel.x86_64 0:6.2-11.el7      yajl-devel.x86_64 0:2.0.4-4.el7     

Dependency Installed:

  cpp.x86_64 0:4.8.5-39.el7  glibc-devel.x86_64 0:2.17-292.el7              glibc-headers.x86_64 0:2.17-292.el7  kernel-headers.x86_64 0:3.10.0-1062.18.1.el7  libmpc.x86_64 0:1.0.1-3.el7            libstdc++-devel.x86_64 0:4.8.5-39.el7 

  mpfr.x86_64 0:3.1.1-4.el7  ncurses-devel.x86_64 0:5.9-14.20130511.el7_4  python-rpm-macros.noarch 0:3-32.el7  python-srpm-macros.noarch 0:3-32.el7          python2-rpm-macros.noarch 0:3-32.el7 

Dependency Updated:

  curl.x86_64 0:7.29.0-54.el7_7.2                                                                                      libcurl.x86_64 0:7.29.0-54.el7_7.2                                                                                     

Complete!

上一篇 下一篇

猜你喜欢

热点阅读