0
Command 'make' is available in '/usr/bin/make'
The command could not be located because '/usr/bin' is not included in the 
PATH environment variable.
make: command not found

It happened after I did this:

export PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/:$PATH

After I copied and paste it it automatically executed in the terminal after realizing my mistake I corrected like this below.

export PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/bin:$PATH

It isn't just make:

Command 'whoami' is available in '/usr/bin/whoami' The command could not be located because '/usr/bin' is not included in the PATH environment variable.
whoami: command not found 
Tim
  • 32,861
  • 27
  • 118
  • 178

2 Answers2

1

You need to include the folders where commands can be found in the PATH environment variable. So it sounds like your PATH environment variable is missing the /usr/bin entry. What is the output of echo $PATH for your system?

The default for Ubuntu 14.04 is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games and you can restore this by simply running

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Then you should be able run the command you tried in the first place to add the paths, or to add them all at once you can simply run...

export PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

I hope this helps!

0

Try this:

export PATH+=:/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/bin

Also, you should consider adding it to .bashrc if you want to make it a part of $PATH every time you open a terminal.