Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ubuntu 12.04 installed. I just installed the gcc-4.6 and g++-4.6 from the same OS media. However when I attempted to install the build-essential package from the same OS media, it says gcc is not installed (what kind of a joke is this?). the version it is require >= 4.4 and the version installed = 4.6. How to get out of this crap?


share|improve this question

Try typing this at a terminal:

which gcc

If nothing comes back, then GCC is probably not in your path variable. Type:

sudo updatedb
locate gcc

If nothing comes up, then there is no executable called gcc on your machine. Reinstall GCC.

If you do get the location of an executable called gcc, such as /usr/bin/gcc, then add the directory to your path:


Obviously use what came back on your system. See if that fixes things. If it does, you can make the PATH change permanent by putting that line in your ~/.bashrc file.

share|improve this answer
Thanks dude, you are really helpful. First time typing – user285825 May 8 '13 at 22:50
You're welcome. If this works for you, make sure to mark the answer as accepted – Freedom_Ben May 8 '13 at 23:02
Sorry I could not finish the comment.Thanks dude, you are really helpful. I created a symbolic link gcc in /usr/bin of gcc-4.6. and I am able to see it by which command and also I can execute gcc. But the problem is still there. please help. – user285825 May 8 '13 at 23:03
That's very strange. Does your machine have internet access that can get to the official package repositories? Also, do you need GCC 4.6 or can you use 4.7? If you can, try isntalling the GCC and build-essential from the official repositories and see if it has the same error. The OS disc sometimes has really old packages in it. – Freedom_Ben May 8 '13 at 23:21
Seems like the package gcc-4.6 is installed, but the gcc is not. Anyway, build-essential should pull it in. Are you trying to install it by apt-get? – grimpitch May 8 '13 at 23:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.