Reputation: 431
Really need help in this one. When I try to compile using cc, it shows
-bash: /usr/bin/cc: No such file or directory
but all the necessary files cc,gcc,c++ are present in the /usr/bin directory. I tried to install gcc-multilib package after which I'm getting this error.
Need to fix it asap as it runs some important programs.
when i did : update-alternatives --list cc
, it showed /usr/bin/gcc
. I then tried, update-alternatives --set cc /usr/bin/gcc
, it gave
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/gcc because link group cc is broken. update-alternatives: warning: not replacing /usr/bin/cc with a link.
Upvotes: 1
Views: 8178
Reputation: 2776
/usr/bin/cc should be a symbolic link on Ubuntu.
Check that its destination is valid with update-alternatives --list cc
.
update-alternatives --set cc /usr/bin/gcc
(as root, sudo should work) should fix it if /usr/bin/gcc is a valid executable.
Upvotes: 2