Pregunta

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.

¿Fue útil?

Solución

/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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top