-1

I am trying to install g++ in my Ubuntu 14.04.1 server

It wants about 5 dependencies, but the last one is libc6, and when I try to install it, this message will appear:

libc6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

What must I do? Remove and re-install libc6?

I cannot install g++ with sudo apt-get install g++ and sudo aptitude g++ or with build-essential

I have tried:

$ sudo aptitude reinstall libc6
Need to get 0 B of archives. After unpacking 0 B will be used.
E: Can't find a source to download version '2.19-0ubuntu6.6' of 'libc6:amd64'
E: Can't find a source to download version '2.19-0ubuntu6.6' of 'libc6:amd64'
E: Internal error: couldn't generate list of packages to download
Zanna
  • 72,312
Farbod
  • 11

1 Answers1

1

I solved it by running

sudo aptitude install g++-4.9

Before that, I downgraded libc6 by explicitly mentioning the version 2.19-0ubuntu6. I had version 2.19-0ubuntu6.6 which was slightly higher than the official repository version and which also set the required version for g++ to 2.19-0ubuntu6.6, which wasn't available. I might have added the higher versioned libc6 from some ppa, but I can't remember.

I asked whether I should try to remove libc6, but it seems the package is at the very very core of the Linux system, and it's impossible to remove. And if removed forcefully, the system will stop working normally, so removing libc6 really isn't an option.

This question might be useful which is about downgrading a package by explicitly passing a version number

Anwar
  • 77,855
Farbod
  • 11