0

I'm a 1 week long linux user.

I've added

export PATH=$PATH:/opt/FriendlyARM/toolschain/4.5.1/bin

to .bashrc for friendlyarm project and it works nice. The arm-linux-gcc -v command shows me details.

When I use make modules command in linux-2.6.38 source folder to compile, gives "permission denied" errors. So I use sudo make modules but it doesn't recognize arm-linux-gcc it says:

make: arm-linux-gcc: Command not found

So I have to use su and just use make modules as root, everything works.

Why doesn't it recognize the path that I've added to .bashrc when I use sudo? Is it normal?

muru
  • 207,228

1 Answers1

0

Use sudo -E instead of sudo to preserve your modified PATH. Otherwise PATH isn't preserved and thus arm-linux-gcc can't be found (see man sudo for details and possible permanent fixes).

If that doesn't work try sudo env PATH=/path/to/gcc:$PATH make target.