CentOS 7更新时出现Multilib version problems

前端之家收集整理的这篇文章主要介绍了CentOS 7更新时出现Multilib version problems前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

这两天在更新CentOS7系统时,出现了Multilib version problems错误,执行命令:

  1. # yum update

出现了的错误信息:

  1. ....
  2. ---> Package libcap-ng.i686 0:0.7.5-4.el7 will be installed
  3. ---> Package libstdc++.i686 0:4.8.5-16.el7 will be installed
  4. --> Finished Dependency Resolution
  5. Error: Multilib version problems found. This often means that the root
  6. cause is something else and multilib version checking is just
  7. pointing out that there is a problem. Eg.:
  8.  
  9. 1. You have an upgrade for glibc which is missing some
  10. dependency that another package requires. Yum is trying to
  11. solve this by installing an older version of glibc of the
  12. different architecture. If you exclude the bad architecture
  13. yum will tell you what the root cause is (which package
  14. requires what). You can try redoing the upgrade with
  15. --exclude glibc.otherarch ... this should give you an error
  16. message showing the root cause of the problem.
  17.  
  18. 2. You have multiple architectures of glibc installed,but
  19. yum can only see an upgrade for one of those architectures.
  20. If you don't want/need both architectures anymore then you
  21. can remove the one with the missing update and everything
  22. will work.
  23.  
  24. 3. You have duplicate versions of glibc installed already.
  25. You can use "yum check" to get yum show these errors.
  26.  
  27. ...you can also use --setopt=protected_multilib=false to remove
  28. this checking,however this is almost never the correct thing to
  29. do as something else is very likely to go wrong (often causing
  30. much more problems).
  31.  
  32. Protected multilib versions: glibc-2.17-196.el7.i686 != glibc-2.17-157.el7_3.1.x86_64
  33. Error: Protected multilib versions: pcre-8.32-17.el7.i686 != pcre-8.32-15.el7_2.1.x86_64
  34. Error: Protected multilib versions: elfutils-libs-0.168-8.el7.i686 != elfutils-libs-0.166-2.el7.x86_64
  35. ......

解决过程如下:

  1. //查询重复的软件包
  2. # rpm -q systemd-libs
  3. systemd-libs-219-30.el7.x86_64
  4. systemd-libs-219-42.el7_4.1.x86_64
  5.  
  6. //删除旧版
  7. # rpm -e systemd-libs-219-30.el7.x86_64
  8. error: Failed dependencies:
  9. systemd-libs = 219-30.el7 is needed by (installed) libgudev1-219-30.el7.x86_64
  10.  
  11. //仍然出现依赖问题,继续查询libgudev1的版本信息
  12. # rpm -q libgudev1
  13. libgudev1-219-30.el7.x86_64
  14.  
  15. //发现只有一个版本,升级试一下
  16. # yum update libgudev1
  17. ......
  18. Updated:
  19. libgudev1.x86_64 0:219-42.el7_4.1
  20.  
  21. Complete!
  22. # rpm -q libgudev1
  23. libgudev1-219-42.el7_4.1.x86_64
  24.  
  25. //升级完成后,删除旧版本的systemd-libs
  26. # rpm -e systemd-libs-219-30.el7.x86_64
  27. # rpm -q systemd-libs
  28. systemd-libs-219-42.el7_4.1.x86_64

最后查询发现只剩下最新版本的systemd-libs,其他重复版本包的解决,也是同样的过程。
核心的命令主要是:

  1. rpm -q package-names
  2. rpm -e package-full-version

猜你在找的CentOS相关文章