I miss aptitude.
July 4, 2010 9:27 PM   Subscribe

Okay, all you Red Hat / Fedora hackers - please, please explain to me this probably-very-simple aspect of the way the YUM package manager works. How do I just uninstall something without trashing everything that package touches?

When I do yum remove x or yum erase x (apparently the sample command) I find myself removing everything x depends on directly. This seems idiotic, as I find myself removing all sorts of important dependencies for stuff to uninstall something tiny. Like: I just tried to uninstall my jack audio connection kit to clean up and start again, and it uninstalled Chromium, important libraries like libsndfile and libsamplerate that I'm using to build stuff, and 71 other things: most of pulseaudio, empathy (!?!), a few dozen important gnome libraries, etc. So now I'm running down a list of 70-odd things and reinstalling all of them. And having read the man page for YUM and googled extensively, I can't for the life of me see how the hell you just uninstall something here.

On Debian, things made some sense, at least; apt-get remove x and apt-get autoremove x meant different things. But here, I'm lost. I have no idea how to uninstall a package and only that package - no dependencies.

Can anyone help me here?
posted by koeselitz to Computers & Internet (20 answers total) 5 users marked this as a favorite
Response by poster: I have to say that all the literature makes it sound like yum remove is supposed to remove a package and all packages that depend on it, not the packages that it depends on. In which case YUM is apparently getting ridiculously confused about what depends on what, since Chromium, qt (one of the things uninstalled - !) and pulseaudio all work fine without jack. So I guess I just want to figure out how to make it ignore all the dependencies completely and just do what I'm asking it to do.
posted by koeselitz at 9:34 PM on July 4, 2010

Best answer: What I suspect happened wasn't that it was removing the packages that jack depends on, rather there was some library that was linked to libjack.so (like gstreamer or something else at the middle level of the sound stack) and it decided that without libjack.so that it had to remove all the gstreamer libs, and therefore anything that uses gstreamer, which is a shit-ton of stuff.

You can try using 'rpm -q -whatrequires' to find reverse dependencies of a package. If you just want to remove a given package by name, try 'rpm -e' instead.
posted by Rhomboid at 10:32 PM on July 4, 2010

Response by poster: Ah! Should've thought of going throug rpm instead, anyway. Thanks, Rhomboid. I will try that.

[I get the feeling most of these troubles stem from this obnoxious fucking Jack thing. Honestly, I've been trying to get it to work on various platforms for so long without success that I begin to have despair - but I need it for Ardour, which is awesome. Ah well. I'll keep working at it. Maybe that'll be my question next week...]
posted by koeselitz at 10:40 PM on July 4, 2010

Yeah, at least on the f13 box I have here, trying to remove 'jack-audio-connection-kit' leads to wanting to remove slv2 and ultimately, gstreamer-plugins-bad-free. Trying to remove that leads to a whole mess of multimedia apps wanting to be removed. I'm possibly misunderstanding what's going on here, but are you sure it's not PulseAudio leading to stress? (Recently had to deal with PA for 5.1 and it kinda sucked...) Additionally, 'the Fedora way' seems to be more disabling a configuration that outright removing a package.
posted by arrjay at 12:45 AM on July 5, 2010

If you're uninstalling a key audio component, then everything that needs audio will uninstall. Otherwise you'd be left with a broken system.

Try this instead: install an alternative to jack, like pulseaudio, then try and remove jack.

Make sure you show us the output!
posted by devnull at 1:40 AM on July 5, 2010

I get the feeling most of these troubles stem from this obnoxious fucking Jack thing.

As far as I know, if you get Jack working, you'll be famous, because you'll be the only person known to history who has gotten it working.
posted by fuq at 5:48 AM on July 5, 2010

and if you get pulseaudio working with a minimum of hassle, you'll be equally famous.
posted by TrialByMedia at 9:03 AM on July 5, 2010

Response by poster: arrjay: “I'm possibly misunderstanding what's going on here, but are you sure it's not PulseAudio leading to stress?”

Oh, it's both, I'm certain. And it's obnoxious, because it's not like I'm trying to take the easy route. I installed this system (Fedora 12) yesterday for the first time expressly because I've been hacking around with Ardour + Jack for a while, and because I want to use the PlanetCCRMA packages (including the realtime-patched kernel) for a dedicated sound-production build of stuff. And I compiled Jack and qJackCTL myself, just to make sure I was doing everything cleanly and correctly. That was enough to satisfy dependencies and allow Ardour to compile (the latest stable version, with VST support - woo!) – but now I notice that Jack just errors out whenever I run it; qJackCTL (the GUI frontend) runs fine, but then when I try to start the sound server, the "messages" dialogue says "Cannot connect to server socket err = No such file or directory." Which led me to believe (in part through some googling) that the default targets for the make install script for Jack were wrong.

I then removed Jack and qJackCTL, but since I'd had a few beers by then my uninstall there was a bit sloppy, and I worry that my reinstall of Jack via YUM must have been partial. Either way, I still get the same error whenever I try to start Jack.

At this point I think I'm going to try to cleanly again – removing all sound servers (ALSA, OSS, PulseAudio, Jack, etc) and recompiling and installing what I need. One hopes that this will satisfy the relentlessly picky and annoying Jack. Who knows.

(Since a few people seem to be interested, anyway, I'll post the results here, even though it really has nothing to do with the question.)
posted by koeselitz at 10:07 AM on July 5, 2010

Response by poster: Argh. rpm -e works better, but it's still pretty focused on dependencies – which I guess is natural and necessary. Now I've uncovered the interesting conundrum that jack-audio-connection-kit is dependent on libsndfile, and libsndfile is dependent on jack-audio-connection-kit, so I can't rpm -e either of them until the other is gone. Which is, of course, impossible.

So I'm going to have to do what I did before: nuke Jack from orbit via yum remove, and then reinstall the 62 different packages (including metacity, chromium, compiz-gnome, gnome-panel, java, qt, etc) that that automatically removes with it.

*sigh* Ah well. Copy-paste, along with the fact that I can yum install package_a package_b package_c ..., makes it pretty easy.
posted by koeselitz at 10:38 AM on July 5, 2010

Response by poster: Okay, I am now convinced that the troubles with installing and uninstalling, and attendant dependancy issues, are all a result of the useful (but strange) planetccrma package from which my version of Jack apparently derives. Also, I didn't help things by compiling and then installing from repositories - there was all kinds of gunk left over in /usr/local/lib and /usr/lib.

I'm now nuking and paving; as I type this, I'm on the Fedora 12 LiveCD, and the anaconda install is running. Hopefully this time I can do it right; if I manage it, I will explain how.
posted by koeselitz at 11:46 AM on July 5, 2010

i stopped using Redhat/Fedora years ago because of RPM dependency issues like this. is there any reason you chose that distro over something like Debian?
posted by TrialByMedia at 12:05 PM on July 5, 2010

Response by poster: Because I don't want to patch together a real-time kernel by hand, because Planet CCRMA is really the best audio-driver set of packages (including a patched real-time kernel) that I can find, and because the Ardour devs all seem to run Fedora. And considering that all the Debian builds that are based on a real-time kernel are ancient, not quite workable or too crufty for me – I haven't managed to get AVLinux working (not a huge, well-supported project anyway, I hate to say), 64 Studio's latest stable is from 2008, and Ubuntu Studio doesn't actually include a real-time kernel anyway (and is kind of a mess, to be honest.)

I love Debian and all, but it seems like we've all failed equally on this point. If it were possible to construct a working Jack/Ardour configuration with my hardware on a Debian platform, believe me, I've already tried it and failed. It's been months trying on and off to get this working, seriously.

Also, to be quite honest, from the little experience I've had over the last two days, Fedora is not what it once was. I'm slowly realizing that dependency issues like this are actually quite rare in Fedora nowadays; this seems like a very stable system, in some ways more stable than Debian. (That is: even when I removed all kinds of essential packages – metacity, for example – everything still worked long enough for me to reinstall. That's kind of amazing.) I can see why Linus uses Fedora instead of Debian, anyway, though I'll always be a Debian purist at heart, I think.
posted by koeselitz at 12:27 PM on July 5, 2010

Best answer: so I can't rpm -e either of them until the other is gone. Which is, of course, impossible.
rpm -e --nodeps
the --nodeps flag is your friend in these instances.
posted by namewithoutwords at 5:35 PM on July 5, 2010 [1 favorite]

Response by poster: Yeah, so I figured it all out! Awesome. (As namewithoutwords points out, that flag is essential; although my problem was of course larger than that.)

The problem was that I didn't realize that the Planet CCRMA packages also add a version of JackDMP / Jack 2 (that is, Jack 1.9.4) so the copy of Jack 1 that I compiled (Jack 0.118) was alongside it, completely confusing qJackCTL.

I now have a completely working audio system, with Jack working perfectly and Ardour recording smoothly, no hangups and no crashes. Basically, what I did was:

1. Installed Fedora 12. Booted up and did some basic config mods for my sanity (e.g. logged in as su and did echo 'loginname ALL=(ALL) ALL' >> /etc/sudoers
to enable sudo, did sudo yum install levien-inconsolata-fonts so that I could use the inconsolata font in my terminal, got my favorite squirrel background, etc.) Then, I removed PulseAudio by running sudo yum remove pulseaudio. That took about three unimportant related packages with it, but I didn't care because they were minor and unnecessary.

2. Installed CCRMA-core to enable the real-time patched kernel. Rebooted so that I was running on that kernel.

3. Noting that installing CCRMA-core automatically installed the CCRMA version of jack-audio connection-kit, I also got the dev package by doing sudo yum install jack-audio-connection-kit-devel.

4. I checked the version of qjackctl (the GUI frontend that is, as far as I can tell, pretty much necessary for Jack) and noted that the only version available through yum was the standard version; the CCRMA repository I'd installed apparently didn't have a version. So I got the latest tarball of qjackctl and compiled it; I needed only a few dependencies, pretty sure it was just the gnu c compiler and its c++ functionality add-on (that is, gcc and gcc-c++). That is, I did sudo yum install gcc gcc-c++, waited for that to install, did tar xvfz qjackctl-0.3.6.tar.gz to decompress the tarball, went into the directory and did ./configure, make, and sudo make install in sequence.

5. Once qjackctl had compiled and installed, I noticed that it added an icon under Applications -> Sound & Video, so I clicked on that to run it and test it. Once it opened, I briefly configured it, setting the input source in the preferences (I have a FastTrack USB external sound card which I'd kept plugged in the whole time; it detected this nicely) and connecting everything in the connect dialog. I started it up, it ran just fine, so I rolled it, and: no problems. Seems to work well. Okay - stop it, turn it off.

6. With that in place, I just went down the list making sure I had all of the dependencies necessary for the Ardour build, which is nicely described here. The actual build itself takes a while, so I went for a walk.

7. Once it was done building, I started up the Jack server and then opened Ardour, and it works fine! Records great, and since I set the output in Jack to run through the internal computer hardware, I get sound out through my speakers, too. Perfect!

I'm now checking out reintegrating PulseAudio (so I can, y'know, have Flash with sound, etc) and it looks promising so far. We'll see.
posted by koeselitz at 6:36 PM on July 5, 2010 [2 favorites]

Response by poster: Holy crap, do you Fedora people seriously not use ffmpeg? I can't figure out how to get it working, and in the Add/Remove Software thingummy, it's listed as a "toolkit for processing movies." !?! Even though I have it installed, the command doesn't work. Ugh.
posted by koeselitz at 6:51 PM on July 5, 2010

i stopped using Redhat/Fedora years ago because of RPM dependency issues like this. is there any reason you chose that distro over something like Debian?

If you're drunk and interrupt a package transaction, Debian will do odd things too...

For people Googling this... yum problem? Post the output!!
posted by devnull at 4:19 AM on July 6, 2010

Now I've uncovered the interesting conundrum that jack-audio-connection-kit is dependent on libsndfile, and libsndfile is dependent on jack-audio-connection-kit, so I can't rpm -e either of them until the other is gone.
rpm -e libsndfile jack-audio-connection-kit

posted by mendel at 10:14 AM on July 6, 2010 [1 favorite]

If you're looking for a particular binary,
yum whatprovides */binname
should tell you what package to install. For ffmpeg I do get an ffmpeg package, but it is provided by RPMFusion and not an integrated package source. It looks like PlanetCCRMA has their own distribution as well. I could see Fedora themselves not wanting to distribute ffmpeg at all due to codec licenensing. (The alternative being to build a 'free-only' ffmpeg which other repos get to replace...)
posted by arrjay at 1:03 PM on July 6, 2010

Response by poster: Hmm. Yeah, it made sense that Fedora wouldn't want to touch ffmpeg, although I'm pretty sure it's in ubuntu-restricted-extras. I do know that it's used to build a lot of things. I compiled my own copy from source yesterday, rather than hunt through repositories (since I'm all about compiling nowadays, heh) and it works fine. However, apparently the headers are irregular, because I then tried to compile the latest test version of VLC player (which has a lot of ffmpeg dependencies, specifically libavcodec, libavutils, etc) but it didn't see those dependencies. I couldn't quite find them either, which means I'd have to go through and do something with symbolic links, and I just couldn't be bothered, so I just installed a native binary of VLC via yum.
posted by koeselitz at 1:20 PM on July 6, 2010

Frankly, ffmpeg is a mess. Places like Fedora (and Windows) don't carry it at all, and Debian disables people's favorite codecs at build time, so a lot of upstream projects end up adding the entire ffmepg pristine library to their source tree, because it's the easiest way to solve all problems at once. So then Debian packaging has to strip that out and force it to compile against the system ffmpeg, since ffmpeg is hardly immune to security hacks and bugfixes (plus, you don't get shared memory benefits if you don't use shared libraries).
posted by pwnguin at 12:19 PM on July 8, 2010 [1 favorite]

« Older Social science guy needs physical science info   |   What am I missing here, to get this thing fired up... Newer »
This thread is closed to new comments.