Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

Thanks

share|improve this question

1 Answer 1

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:

PATH=/usr/bin:$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

 
discard

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.