I can compile using icc just fine:
akady@TermintX ~/Test $ icc HelloWorld.c
akady@TermintX ~/Test $ ls
a.out HelloWorld.c
akady@TermintX ~/Test $ ./a.out
Hello World
But when trying the same thing with sudo:
akady@TermintX ~/Test $ sudo icc HelloWorld.c
[sudo] password for akady:
sudo: icc: command not found
(Though gcc works fine, both with and without sudo)
make all install
stage. It gives a similar error abouticc not found
. I can't figure out just how to go about adding the path to icc, nothing seems to work. Apologies if this is trivial, I am a bit new to linux. – Pyrphoros Sep 05 '16 at 06:42make all
as an ordinary user, thensudo make install
to install the result. Each argument tomake
is a separate target that you can do independently. – meuh Sep 05 '16 at 07:42