CentOS 7更新时出现:Multilib version problems问题的解决方法
前言
关于CentOS的出身就不多多说了,拥有RHEL所有功能和性能,甚至更加友好,最重要一点是免费,深受大家的喜爱,CentOS的受欢迎程度并不亚于Ubuntu,之前安装了CentOS7,关于安装的教程,有需要的朋友们可以参考这篇文章:https://www.nhooo.com/article/95263.htm ,下面话不多说了,来一起看看详细的介绍吧。
发现问题
最近这两天在更新CentOS7系统时,出现了Multilibversionproblems错误,执行命令:
#yumupdate
出现了的错误信息:
.... --->Packagelibcap-ng.i6860:0.7.5-4.el7willbeinstalled --->Packagelibstdc++.i6860:4.8.5-16.el7willbeinstalled -->FinishedDependencyResolution Error:Multilibversionproblemsfound.Thisoftenmeansthattheroot causeissomethingelseandmultilibversioncheckingisjust pointingoutthatthereisaproblem.Eg.: 1.Youhaveanupgradeforglibcwhichismissingsome dependencythatanotherpackagerequires.Yumistryingto solvethisbyinstallinganolderversionofglibcofthe differentarchitecture.Ifyouexcludethebadarchitecture yumwilltellyouwhattherootcauseis(whichpackage requireswhat).Youcantryredoingtheupgradewith --excludeglibc.otherarch...thisshouldgiveyouanerror messageshowingtherootcauseoftheproblem. 2.Youhavemultiplearchitecturesofglibcinstalled,but yumcanonlyseeanupgradeforoneofthosearchitectures. Ifyoudon'twant/needbotharchitecturesanymorethenyou canremovetheonewiththemissingupdateandeverything willwork. 3.Youhaveduplicateversionsofglibcinstalledalready. Youcanuse"yumcheck"togetyumshowtheseerrors. ...youcanalsouse--setopt=protected_multilib=falsetoremove thischecking,howeverthisisalmostneverthecorrectthingto doassomethingelseisverylikelytogowrong(oftencausing muchmoreproblems). Protectedmultilibversions:glibc-2.17-196.el7.i686!=glibc-2.17-157.el7_3.1.x86_64 Error:Protectedmultilibversions:pcre-8.32-17.el7.i686!=pcre-8.32-15.el7_2.1.x86_64 Error:Protectedmultilibversions:elfutils-libs-0.168-8.el7.i686!=elfutils-libs-0.166-2.el7.x86_64 ......
解决过程如下:
//查询重复的软件包 #rpm-qsystemd-libs systemd-libs-219-30.el7.x86_64 systemd-libs-219-42.el7_4.1.x86_64 //删除旧版 #rpm-esystemd-libs-219-30.el7.x86_64 error:Faileddependencies: systemd-libs=219-30.el7isneededby(installed)libgudev1-219-30.el7.x86_64 //仍然出现依赖问题,继续查询libgudev1的版本信息 #rpm-qlibgudev1 libgudev1-219-30.el7.x86_64 //发现只有一个版本,升级试一下 #yumupdatelibgudev1 ...... Updated: libgudev1.x86_640:219-42.el7_4.1 Complete! #rpm-qlibgudev1 libgudev1-219-42.el7_4.1.x86_64 //升级完成后,删除旧版本的systemd-libs #rpm-esystemd-libs-219-30.el7.x86_64 #rpm-qsystemd-libs systemd-libs-219-42.el7_4.1.x86_64
最后查询发现只剩下最新版本的systemd-libs,其他重复版本包的解决,也是同样的过程。
核心的命令主要是:
rpm-qpackage-names rpm-epackage-full-version
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对毛票票的支持。