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
我这样做之后发生了以下事情:
export PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/:$PATH
在我复制并粘贴之后,它会自动在终端中执行,当我意识到我的错误后,我如下所示进行了更正。
export PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/bin:$PATH
这不仅仅是制造:
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
答案1
您需要在 PATH 环境变量中包含可以找到命令的文件夹。因此听起来您的 PATH 环境变量缺少该条目。您的系统/usr/bin
的输出是什么?echo $PATH
Ubuntu 14.04 的默认设置是 /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
,你可以通过运行
导出 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
然后您应该能够运行您首先尝试的命令来添加路径,或者只需运行一次即可添加所有路径......
导出 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
我希望这有帮助!
答案2
尝试这个:
export PATH+=:/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/bin
此外,如果您想让它成为每次打开终端.bashrc
的一部分,您应该考虑将其添加到。$PATH