View Full Version : compiling cpp files

April 2nd, 2007, 08:53 PM

I initially posted this in the absolute beginner talk but realized this section may be more appropriate. I apologize for that and mods may please remove the thread in the beginner section.

I am having some trouble compiling c++ files

I have used

sudo aptitude install build-essential, which gave me the following error:

libc6-dev: Depends: libc6 (= 2.3.6-0ubuntu20.4) but 2.4-1ubuntu12 is installed.

I have also tried apt-get install build-essential as well as synaptic both of which gave me the following error

Depends: libc6-dev but it is not going to be installed or
Depends: g++ but it is not going to be installed
i have tried apt-get -f install and also the apt-get update

i have been searching for quite a while now but couldnt find anything to help me out
i don't know if i have problems with my repositories


April 2nd, 2007, 08:55 PM
Install libc6 manually:

sudo apt-get install libc6

Then try installing the build-essential again.

April 2nd, 2007, 09:01 PM
thanks for the quick reply.

however that did not help, i still get the same errors and on trying g++ i get
bash: g++: command not found

April 2nd, 2007, 09:02 PM

sudo aptitude install build-essentialaptitude is smarter than apt and may be able to resolve the dependencies.

Edit: Sorry, I'm an idiot and didn't see that you already tried using aptitude.

April 2nd, 2007, 09:04 PM
yep i tried that earlier and got the following dependency error

libc6-dev: Depends: libc6 (= 2.3.6-0ubuntu20.4) but 2.4-1ubuntu12 is installed.

and I tried removing and reinstalling using Aptitude but i still can't get it working

April 2nd, 2007, 09:09 PM
You can try downgrading your version of libc currently installed. Using synaptic you can right-click, select properties, and select version tab. Hopefully there will be an older version available to attempt a downgrade.

Rui Pais
April 2nd, 2007, 09:13 PM
yours it's a strange problem...
your system requires libc6 for dapper but you got libc6 for edgy.
Seems that you have a mixed distro. Usually thats not a great problem... but with lic6 *IS*.
You can not play around with that (you can not uninstall it without bork the system... :(

What exactly you got, dapper or edgy? If it's dapper (seems to be) do you have any edgy references on your sources.list?

April 2nd, 2007, 09:21 PM

Thanks for all your replies. i figured the problem was something to do with my repositories so i upgraded the repository list and it finally installed and everything seems to be working now

thanks again