-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
  • 70,465
Farbod
  • 11
  • 1
    You are duplicating your question, making it difficult to see what help has been offered by others. – ubfan1 Mar 14 '15 at 16:56
  • Dear ubfan1, you are right! but this duplication is because there is no solution for my late questions! what must I do ? removing the old ones? – Farbod Mar 14 '15 at 17:26
  • You could make your previous question(s) better by including more information: for example how you installed g++-4.9 on your 14.04.1 system (since afaik the package should not be available); did you add a PPA or mess with your sources.list? – steeldriver Mar 14 '15 at 19:15
  • Dear steeldriver, i am not sure about the PPA, but i used sudo apt-get install for g++-4.9 and it says it depends to another dependencies and . . . the whole story – Farbod Mar 14 '15 at 19:27

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
  • 76,649
Farbod
  • 11
  • No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 6 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. – Dr.jacky Jul 06 '15 at 11:30
  • 1
    How did you downgrade? Normally aptitude will always try to install the latest – Anwar Aug 24 '17 at 14:14