Stephen Harris
2011-Apr-10 21:51 UTC
[CentOS] How to verify all dependencies are being met
I've taken over a CentOS machine. The previous SA had a habit of using the --nodeps flag to rpm to remove packages (he was trying to build a small server and removed packages he felt weren't needed). I have a horrible feeling that this has resulted in some required dependencies no longer being met. The server kinda-works, but it may break in unexpected ways; I don't like being surprised! Is there an easy way to determine what rpms might be missing? I'd hoped to use something like "rpm -qR" against each of the installed packages, but that output isn't simply converted to rpm package names. Any guidance appreciated! Thanks, -- rgds Stephen
Ljubomir Ljubojevic
2011-Apr-10 22:33 UTC
[CentOS] How to verify all dependencies are being met
Stephen Harris wrote:> I've taken over a CentOS machine. The previous SA had a habit of using > the --nodeps flag to rpm to remove packages (he was trying to build a > small server and removed packages he felt weren't needed). I have a > horrible feeling that this has resulted in some required dependencies > no longer being met. The server kinda-works, but it may break in > unexpected ways; I don't like being surprised! > > Is there an easy way to determine what rpms might be missing? I'd hoped > to use something like "rpm -qR" against each of the installed packages, > but that output isn't simply converted to rpm package names. > > Any guidance appreciated! > > Thanks, >Try something like this: yum reinstall $(yum list installed | awk '{print $1}') It should force reinstall and ask for dependencies in the process, but I do not have any broken system to try if it works. Ljubomir
Yves Bellefeuille
2011-Apr-11 01:46 UTC
[CentOS] How to verify all dependencies are being met
On Sunday 10 April 2011 17:51, Stephen Harris wrote:> I've taken over a CentOS machine. The previous SA had a habit of > using the --nodeps flag to rpm to remove packages (he was trying to > build a small server and removed packages he felt weren't needed). I > have a horrible feeling that this has resulted in some required > dependencies no longer being met. The server kinda-works, but it may > break in unexpected ways; I don't like being surprised! > > Is there an easy way to determine what rpms might be missing? I'd > hoped to use something like "rpm -qR" against each of the installed > packages, but that output isn't simply converted to rpm package > names.Does "package-cleanup --problems" do what you want? It's in the yum-utils package. --problems: List dependency problems in the local RPM database. -- Yves Bellefeuille <yan at storm.ca> "La Esperanta Civito ne rifuzas anticipe la kunlaboron de erarintoj, se ili konscias pri sia eraro." -- Heroldo Komunikas, n-ro 473.