Previous Section  < Day Day Up >  Next Section

Recipe 2.10. Fixing RPM Installation Problems

2.10.1 Problem

You are trying to install an RPM, but the installation fails with "Error: Failed dependencies." Welcome to dependency hell.

2.10.2 Solution

Collect all of the RPMs needed to satisfy the dependencies, then install them all at once. For example:

# rpm -ivh tuxpaint-0.9.13-1.i386.rpm

error: Failed dependencies

    SDL_image is needed by tuxpaint-0.9.13-1

    SDL_ttf is needed by tuxpaint-0.9.13-1

    libSDL_image-1.2.so.O is needed by tuxpaint-0.9.13-1

    libSDL_ttf-2.0.so.O is needed by tuxpaint-0.9.13-1

# rpm -ivh tuxpaint-0.9.13-1.i386.rpm  SDL_image-1.2.3-4.i386.rpm  SDL_ttf-2.0.6-1.i386.rpm

The installer will sort them out and install them in the correct order.

What if RPM complains about a missing file or package, and you are certain it is installed? Sometimes the RPM database contains errors, so try rebuilding it:

# rpm -rebuilddb

If that doesn't help, reinstall the allegedly missing package with —replacepkgs:

# rpm -ivh —replacepkgs SDL_ttf-2.0.6-1.i386.rpm

If you are certain the necessary libraries exist on your system, try either forcing the installation, ignoring errors:

# rpm -ivh —force  tuxpaint-2002.10.20-1.i386.rpm

or don't check dependencies:

# rpm -ivh —nodeps tuxpaint-2002.10.20-1.i386.rpm

If you find yourself stuck with unresolvable dependency conflicts, try installing your new program and all of its dependent packages from source RPMs (see Recipe Recipe 2.11).

2.10.3 Discussion

Where do you find the packages you need? Your first stop should be the home page of the program you're trying to install. Be sure to read any available documentation.

RPM-based distributions are quite diverse these days, so be sure to get RPMs built for your system. These are some of largest public RPM archives:


FreshRPMs

http://freshrpms.net


rpmfind

http://rpmfind.net


rpm.pbone

http://rpm.pbone.net

2.10.4 See Also

    Previous Section  < Day Day Up >  Next Section