精选圈子榜单优站
编程综合
编程综合
技术
20关注
编程技术记录、分享 ,记录你的编程生活点点滴滴!

Command not included in the PATH environment variable.


在修改了~/.bashrc 中的变量刷新系统环境后出现了这个问题:


$ ls

Command 'ls' is available in '/bin/ls'

The command could not be located because '/bin' is not included in the PATH environment variable.

ls: command not found


料想肯定是环境变量配置有问题。

于是:

$ vim ~/.bashrc

Command 'vim' is available in '/usr/bin/vim'

The command could not be located because '/usr/bin' is not included in the PATH environment variable.

vim: command not found

意思是在本地环境变量中找不到这个指令了。


尝试直接访问vim在本地中的指令存放地址使用:

$ /usr/bin/vim ~/.bashrc

访问成功。

发现最后添加的export之后的 $PATH 缺了$。补全,wq保存后,重新刷新环境变量:

$ source ~/.bashrc

问题即解决。


  • 若文章侵犯了您的权益,请联系我们进行处理。

  • 2017-03-20
  • 2087阅读
评论