0

I did the update from Ubuntu 14.04 to Ubuntu 14.10 yesterday. Today I tried to run g++-4.8 as I normally do, but I have the following error:

make: g++-4.8: Command not found

I have the same error with g++-4.9 or g++. I tried installing g++ again:

sudo apt-get install g++

But I have the following error message:

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.9 (>= 4.6.4-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Then I tried dist-upgrade:

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libc6 libc6:i386 libc6-dbg valgrind
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

And install -f:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

but it did not change anything. I purged gcc and build-essential. But I have the same error when trying to reinstall build-essential:

sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:4.4.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Edit: I looked at this answer but it failed removing the package libc6:

romain@romain-N56VZ:~$ sudo apt-get remove --dry-run libc6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 hunspell-fr : Depends: hunspell-fr-classical but it is not going to be installed or
                        hunspell-fr-modern but it is not going to be installed or
                        hunspell-fr-revised but it is not going to be installed or
                        hunspell-fr-comprehensive but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Romain
  • 101
  • 5

1 Answers1

0

Ok I fixed it:

I removed the packages that were causing the errors, starting by valgrind:

sudo apt-get remove valgrind

and then the 3 other ones. And no more errors after that.

Romain
  • 101
  • 5