The first thing to say is: "I am noob", so please be patient and don't laugh.. too much on me. I need to install c / c++ compiler and I heard that the best thing to do is to install gcc/g++ for that purpose (I think I don't have it on my machine).
maistora@maistora:~$ gcc --version
bash: gcc: command not found
I also read if I install build-essential the c/c++ compiler comes with it. So what I did is:
maistora@maistora:~$ 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: gcc (>= 4:4.4.3) but it is not going to be installed
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
E: Broken packages
Then, I don't know why but I decided to install the dependencies one by one and started with the libc6-dev and this is the output:
maistora@maistora:~$ sudo apt-get install libc6-dev
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:
libc6-dev : Depends: libc6 (= 2.11.2-10) but 2.13-21 is to be installed
Depends: libc-dev-bin (= 2.11.2-10) but it is not going to be installed
Recommends: gcc but it is not going to be installed or
c-compiler
E: Broken packages
And the next thing I did is:
maistora@maistora:~$ sudo apt-get install libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
which seem very strange to me. But I'm sure that something basic for you. So, my question is - how can I install build-essentials on my Debian 6 Squeeze or any work-around to install gcc/g++.
P.S. If I write sudo apt-get install gcc I will get to the beginning of my post and ending with libc6 is already the newest version. (hope I make my point clear). Thanks in advance.