How do you install two or more RPM packages when they depend on each other?

Question:  How do you solve circular dependency problems when installing RPMs in RedHat Linux?
Problem Scenario:  For example, you keep trying to install different RPMs, but they always require a different installation.  By exhaustively going through the dependencies, you find a circle of dependencies.  This is sometimes called mutual recursion.

Root cause:  Human error.

Solution:  The way to resolve circular dependencies is with a yum localinstall command with a list of each of the RPM packages afterward. For example if packageA.rpm depends on packageB.rpm to be installled, and packageB.rpm depends on packageC.rpm to be installed, and finally packageC.rpm depends on packageA.rpm to be installed, what do you do?  Put packageA.rpm, packageB.rpm, packageC.rpm in the local directory.  Then do this:
yum localinstall packageA.rpm packageB.rpm packageC.rpm

For people new to patching RedHat derivatives, learning to apply different patches simultaneously solves the circularly dependent problem.  If there is an error message still, and it seems impossible to solve, look closely at the error message.  The error message may have a subversion in the requires message (e.g., a subtle .5 after a number) that is slightly higher than one of the versions that you are trying to install. Certain combinations of .rpm files can be finicky or particular with each combination of .rpm versioned files.  The solution is possible however.  Once you have the correct versions of potentially long-named .rpm files, do the following:

Step #1:  Go to the directory where your .rpm files are.

Step #2:  Issue on of the following:

  yum localinstall *.rpm

  rpm -ivh *rpm

Any persistent error message may be telling you something.  There may be a version incompatibility.

Leave a comment

Your email address will not be published. Required fields are marked *