Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

So... after isntalling gcc4.7, I found I had gcc4.5, 4.6 and 4.7. After configuring alternatives, when typing gcc --version it said it was 4.7, but I was not sure that Qtcreator were using the right one, so I decided to erase 4.5 and 4.6.

And... I shouldn't have done that. Now, even when I reinstalled 4.6 with aptitude, gcc command is not found (/usr/bin/gcc: NO such file or directoy).

I need to fix this or I can't continue working. I'm only interested in having 4.7. Any help?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Try that:

sudo ln -sf /usr/bin/gcc-4.7 /usr/bin/gcc

This will recreate the missing symbolic link to the actual gcc executable (gcc in default installation is just a symbolic link to gcc-4.6).

share|improve this answer
Thanks, that worked! I guess that's the commando used to create a link to gcc-4.7, isn't it? –  Roman Rdgz Sep 28 '12 at 6:54

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.