yum Archives

How to install an rpm file on CentOS

On extremely rare occasions (LOL) we get precompiled binaires we can install on our Linux systems. Depending on the distributions, we may end up with an rpm file. I always forget how to install them when this happens – probably it happens so very rarely. Here’s how we can do that. Installing rpm files with … Read more

Removing the latest Kernel in CentOS

I’ve had a power cut recently, which seems to have corrupted the latest Kernel I have installed on my CentOS 6 server. I can boot into the previous one just fine, but of course if I forget to make a choice on startup, the server doesn’t start up. That’s annoying.

Thankfully there are ways to either fix the latest version, remove it, and even exclude a particular version from future updates. Here’s what worked for me on CentOS 6:

Read more

How to revert a yum update on CentOS

Every so often, a yum update brings unexpected results with it, like services no longer working due to spurious error messages that don’t tell you what’s actually wrong. This only very rarely happens though, and we may need to revert to the state of our system before such an update took place. Thankfully, yum has … Read more

How to remove duplicate packages with yum

I’m working on a handful of servers that all have the same problem: when running yum, an error message appears that tells me a package called ntpupdate needs to be upgraded, but somehow this doesn’t work and the package is being skipped. Then follows a huge list of duplicate packages that are installed on those systems (probably installed by the automatic package updater within Plesk).

Let’s see how we can fix such issues.

Read more

How to fix duplicate packages in yum

From time to time, the yum package manager may encounter issues with duplicate packages that are erroneously installed on a system. This manifests in a yum update going awry, telling us something along the lines of this:

yum update
...
--> Finished Dependency Resolution
Error: Package: ntp-4.2.6p5-22.el7.centos.2.x86_64 (@updates)
           Requires: ntpdate = 4.2.6p5-22.el7.centos.2
           Removing: ntpdate-4.2.6p5-22.el7.centos.2.x86_64 (@updates)
               ntpdate = 4.2.6p5-22.el7.centos.2
           Updated By: ntpdate-4.2.6p5-25.el7.centos.x86_64 (base)
               ntpdate = 4.2.6p5-25.el7.centos
 You could try using --skip-broken to work around the problem
** Found 41 pre-existing rpmdb problem(s), 'yum check' output follows:
// huge scary list of packages follows

You may at times install all other packages via yum update –skip-broken, but it will still leave some trouble on the system. Best to take care of it.

Here’s how I’ve managed to do it on many occasions:

Read more

How to fix yum update failure blaming “qpid-cpp”

I’ve just tried to update one of my CentOS 6.2 servers that was built from an older AMI, only to find that the yum update command stopped unexpectedly with several dependency errors. They all pointed to something called “qpid”, and I must admit that I’ve never heard of it – nor did I know that … Read more

How to list installed packages on CentOS

yum can help us here. This should do the trick: #yum list installed If you’re interested in a particular package, you can pipe a search string into grep and only list filtered results: #yum list installed | grep “yum” keyutils-libs.i686 1.4-4.el6 @anaconda-CentOS-201303020136.i386/6.4 yum.noarch 3.2.29-40.el6.centos yum-metadata-parser.i686 yum-plugin-fastestmirror.noarch The search string doesn’t even need to be in … Read more