[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How can g++ (stable) be incompatible with a fresh stable install?



I've run into a situation I find deeply puzzling, so I'm now in a
desperate quest for understanding...

I just did an install from debian-7.7.0-amd64-netinst.iso on my laptop.

When I attempt to install g++, I get the following

    # apt-get -y install g++
    ...
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     g++ : Depends: g++-4.7 (>= 4.7.2-1~) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

(FWIW, I ran `aptitude update`, yadda-yadda.  More details at the end.)

I'm sure that someone with a good understanding of dpkg & friends
would be unfazed by such an error and would know what to do make sense
of it and get past it, but I (a dpkg ignoramus) find it bewildering.

My goal now is to learn how to make sense of such an error.

(In particular, I'm not searching for "shot-in-the-dark" "things to
try" to see if somehow the error "goes away".  At the moment I'm more
interested in insight than in g++.)

I've determined that the root of the problem is that, for some reason,
the Debian installer chose to put version 2.13-38+deb7u6 of libc6 on
my laptop whereas g++ depends, indirectly, on =2.13-38+deb7u4.  (Both
versions are from stable.)

I considered replacing 2.13-38+deb7u6 with 2.13-38+deb7u4, but
uninstalling 2.13-38+deb7u6 would require uninstalling a list of
packages a mile long, and the prospect of having to re-install all
those packages, each with the risk of running into the same kind of
bewildering incompatibility I found with g++, looks to me like hell.

So the situation, as I see it now, is:

    * an important package (g++) from stable, is by default
incompatible with a brand-new, 100% stable system, because
    * the stable branch includes *two* versions of a ubiquitous
dependency (libc6);



I would greatly appreciate if someone would be so kind as to explain
to me why this situation is not as perverse as it's looking to me
right now.

kj






--------------------------------------------------------------------------------


PS: below is a whole bunch of nitty-gritty, FWIW.

1. Before I tried to install g++ I had already installed the following
packages, all from stable: netselect-apt, tree, zsh, zsh-doc, screen,
emacs, git, dpkg-dev, python-pip.

2. Before attempting any installation (except for netselect-apt), I
ran `aptitude update` and `aptitude full-upgrade`.  At the end of the
output from `aptitude update` were the following warnings:

    W: Ignoring Provides line with DepCompareOp for package
php-psr-log-implementation
    W: You may want to run apt-get update to correct these problems

   Following the last warning I ran `apt-get update`, which produced
exactly the same warnings.

3. I used a configuration for some files under /etc/apt/ based on the
one given in http://serverfault.com/a/382101.  The only modifications
I did to them are that (a) I removed all the mentions of `non-free`,
and (b) I used netselect-apt's top suggestion as the mirror instead of
mirror.steadfast.net.  My /etc/apt/sources.list file is empty; all the
sources configuration is under /etc/apt/sources.list.d.

4. The key dependecy chain behind the error shown above goes like this:

    g++ depends on
    g++-4.7 (>= 4.7.2-1~) depends on
    libstdc++6-4.7-dev (= 4.7.2-5) depends on
    libc6-dev (>= 2.13-5) depends on
    libc6 (= 2.13-38+deb7u4)

5. At the "software selection" step of the installation I chose:
desktop, print server, ssh server, and laptop


Reply to: