Click to See Complete Forum and Search --> : RPM Dependencies


Ace69
09-04-2001, 04:21 PM
RPM Dependencies have always been a mystery to me. I know what they are and understand them, but I don't know the consequences of using options such as --nodeps and --force. I know the literal meaning of them, but what would an rpm do to your system if you used these commands. I have had sometimes where it screwed things up and other times where it worked properly.

Breetie
09-04-2001, 04:51 PM
Depending on your distro (another dependency!), the idea behind --nodeps and --force is that, especially if you KNOW you have the required libraries installed, and it still thinks/says they aren't, you can go ahead and installed the program/library without running into that wall. If you're not sure, or the library is dated or maybe even modified for a specific set of programs, it has the potential to not work. Which is the worst-case scenario I've had to deal with thus far. Something you can sometimes do, is use 'rpm -q (nameofprogramhere)' and sometimes that will tell you. There are other params, too, to be more specific in the search to see if it is installed.
Usually, I'll pipe the string through grep to do a search with wildcards, but that's just me!
Anyway, yeah...I haven't had any rpms trash my system, yet (but then, I've only installed mainstream programs--GIMP, Mozilla 0.9.3x, Blender, etc.--so it isn't anything that messes with kernel functions or the like. With other programs I can't be sure. Especially any devel utilities or helper applications, it could be different. Maybe someone else knows? Anyone?

Malakin
09-04-2001, 04:52 PM
In theory when you try to install something and it gives you conflicts so you decide to use --force, if you take note of everything that was conflicting you should be able to uninstall the new rpm you just installed, then go back and reinstall with --force the ones it was conflicting with to return your system to the way it was. Often if it's conflicing all you need to do is use -U instead (upgrade).

If you install something and ignore dependancies and it doesn't end up working then you can always go back and take care of the dependancy problems.

Here's some useful rpm commands for you or anyone else reading this:

list dependancies: "rpm -qpR"

list files: "rpm -qpl"
list files looking for where it's putting it's binaries: "rpm -qpl | grep bin"

list files including package name which is helpful if you do something like search a bunch of rpms for a specific lib and you want to know which one it found it in: "rpm -qp --filesbypkg" so what I do sometimes is go to the RPMS directory on my CD and type "rpm -qp --filesbypkg * | grep whateverlib -i" when I'm looking for a specific lib, this will tell me if any of the rpms on the cd contain it and if so which one.

rpm information: "rpm -qpi"

Or if you want to see if an rpm is properly installed: "rpm -V rpmname" Note that when you're not referring to packages you just use the short name not the file name so this doesn't include the version information. So "XFree86-4.0.3-7mdk.i586.rpm" turns into "XFree86"

If I install something ignoring deps and it doesn't work you can also use "ldd filename" (on the executable), this will list all the object files it loads in, it's usually missing one or the symlink is missing/wrong.

Once you fully understand all this it's pretty much impossible for an rpm to screw up your system so you can't fix it in a few minutes.

[ 04 September 2001: Message edited by: Malakin ]