Thursday, July 7, 2011

RPM Error: failed dependencies

Issuing rpm -i or rpm -U installs the software and you can start using it. RPM is very easy when it works. However, RPM can be a devil when it doesn't work. There are many reasons why installing software goes wrong, but usually it's because of failed dependencies.

You see, many Linux programs need other files or programs in order to work properly. In other words, a certain piece of software depends on other software. When you try to install an RPM package, RPM automatically checks its database for other files that the software being installed needs. If RPM can't find those files in its database, it stops installing the software and complains about failed dependencies.

When you get a dependency error, RPM spits out a list of files the program needs. Take a look at the list. The files in the list are probably ones you don't have on your system, or files you have but are wrong versions. When you get the dreaded dependency error, you'll have to find the files RPM complains about, install or upgrade those files first, and then try to install the package you were installing in the first place.

However, sometimes RPM is just plain stupid. You see, only software that was installed with RPM gets added into the database of installed software. This means that if you've used some other method for installing a certain program, RPM doesn't know the program exists on your system. In this case RPM complains about failed dependencies even when the needed program does exist on your system and there are no failed dependencies!

If you know the needed files are there and RPM is just being stupid, you can ignore the dependencies. Use the --nodeps option if you want to tell RPM not to check any dependencies before installing the package:
# rpm -i software-2.3.4.rpm --nodeps

This forces RPM to ignore dependency errors and install software anyway, but note that if the needed files are missing anyway, the program won't work well or won't work at all. Use the --nodeps option only when you know what you're doing or when you're bone-headed enough ;-)

0 comments:

Post a Comment