LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Aptitude dependency-resolution subproc crashing (https://www.linuxquestions.org/questions/debian-26/aptitude-dependency-resolution-subproc-crashing-734309/)

mcsmcs 06-19-2009 11:11 PM

Aptitude dependency-resolution subproc crashing
 
Ok... first off, am pretty new to Linux so bear with me a bit - am moving a web-dev environment from Win32 platform to unix (Debian/Lenny) and having some trouble. At the highest level, need to get the GD imaging suite installed under PERL (for real-time Apache-host imaging support). Managed to get the GD tar package onto the machine and attempted to install it. Installation failed - research on the package shows that it requires the C++ compiler. Attempted to install g++ (listed under Not Installed Packages -> devel -> main -> g++).

As soon as I mark it for installation (using "+"), Aptitude launches into the "Resolving Dependencies" routine. It runs for about 3 hours, hitting counts around 120,000 Open/Closed, and finds 11 in Conflict. Not sure if this is normal or not, but I'm fine with it taking awhile to fix mismatches, etc... what I ran into is that swap space filled (1GB swap, with 1GB ram on Lenovo laptop), and the entire Resolving Dependency sub process crashed. It also appears that I cannot adjust other packages without getting these conflicts resolved, so I'm stumped as to how to get the system to do anything at this point.

Could someone provide some insight as to just how many Open/Closed entries may be found and how much swap space is actually required to allow this to do what it needs to get the conflicts resolved? I may be going in the wrong direction, but as I said... am pretty new to the Linux environment. The Debian install that I have is pretty basic - used a single 650mb disk, and only a couple of perl modules / apt packages have been added so far).

Thanks in advance for any help!
~Marc

AlucardZero 06-20-2009 09:07 AM

That is entirely abnormal. Several things -

Which GD suite? It probably already has a Debian package, you just need to find it. Search here or with aptitude search foo. If you find it already packaged, you can do aptitude install packagename.

You don't have to use the "g"ui of aptitude; you can give it command-line .. commands and arguments such as in the previous.

To compile things, you need more than g++. Make sure to do aptitude update (preferably before any time you do package management). Then do aptitude install build-essential to get them.

If it still churns and fails (it should take <15 seconds to sort out dependencies in a normal setup), please post the contents of /etc/apt/sources.list, /etc/apt/preferences if it exists, and the full console output from the install command.

mcsmcs 06-20-2009 09:05 PM

Ok, still no luck. Made a text file of the actions taken (is kind of lengthy)... here is the link.

Thanks for the reply - tried to do what I could but didn't make much progress yet.

~Marc

radiodee1 06-21-2009 06:00 AM

Your sources.list file is not clear about which repositories you are using. For lenny (the current stable) it should look something like this:

Code:

deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main

deb http://http.us.debian.org/debian/ lenny main contrib non-free
deb-src http://http.us.debian.org/debian/ lenny main

deb http://www.debian-multimedia.org lenny main

This is just a suggestion, of course. You may want to just comment anything out of your current sources.list file that refers to "sid" or "squeeze". You also may want to add the "debian-multimedia" line.

Telemachos 06-21-2009 06:34 AM

To follow up on what Radiodee said, his idea is not really just a suggestion. Your /etc/apt/sources.list is not sane. What you are seeing is the result of that source list. You can't ask aptitude to work out dependencies for the following four branches of Debian simultaneously: etch, lenny, squeeze and sid. You need to choose which branch you want to follow and adjust your sources accordingly.

Also, whatever version of Debian you think you're running, there's a decent chance you're wrong. A souces list like that, assuming it grew and changed over time, probably means you are running a radically mixed system. This can be ok, but it's often the sign of trouble. You should also consider reinstalling, using Lenny or Squeeze (depending on what you want). Before you choose Squeeze, check around for the state of the Squeeze installer discs. The last I heard, they were a bit erratic. (Squeeze is testing, after all.)

One other thing, rather than install g++ individually, I recommend that you install the build-essential package. It gives you all you need for a basic development environment, including gcc and g++. But again, first you need to clean up that machine.

AlucardZero 06-21-2009 08:00 AM

Okay, yep, your sources.list is not sane. Assuming you want Lenny - first thing to try is to remove any line that doesn't have "lenny" in it from source.list, and see if you can do what you want (after an aptitude update). If you can't, it's likely you have a mixed system. To go back to pure lenny, you can use apt-pinning to pin lenny at importance 1001, which will tell aptitude to downgrade anything that's not at lenny, to lenny.

Telemachos 06-21-2009 08:43 AM

Quote:

Originally Posted by AlucardZero (Post 3581269)
To go back to pure lenny, you can use apt-pinning to pin lenny at importance 1001, which will tell aptitude to downgrade anything that's not at lenny, to lenny.

I tried this once (when Lenny was still testing) to downgrade from Sid back to Lenny/Testing. It had mixed results since some packages will change names and dependencies from one version to another.

I think that a reinstall is cleaner and - to be frank - much more straightforward for someone new to Linux. Also, if this is meant to be a production webserver, better to reinstall and take a small amount of time now rather than risk a lot of potential time and headaches later.

mcsmcs 06-25-2009 01:04 AM

Wow... ok guys, finally got this up and running. Thanks for the help on this - apologies for reply delay - was out of town for a few days!

To sum this one up - you all were spot on - the sources list was messing everything up. As soon as I edited it to look like radiodee's post, was able to run the update without a hitch. g++ installed as part of the update, so the GD installation was able to complete (had to create the gdlib-config file in /usr/bin by hand though - sounds like this may be a workaround to a known issue), but the GD suite is actually doing what it's supposed to be doing lol. It is also no longer kicking off the dependency-resolution routine, so it appears that the conflicts have been resolved ... for now : )

As I pretty much expected, this was a noob error! Thanks again for the guidance.
Cheers,
~Marc


All times are GMT -5. The time now is 08:23 AM.