Nemo

Nemo 关注TA

路漫漫其修远兮,吾将上下而求索。

Nemo

Nemo

关注TA

路漫漫其修远兮,吾将上下而求索。

  •  普罗旺斯
  • 负责帅就完事了
  • 写了1,495,102字

该文章投稿至Nemo社区   Java  板块 复制链接


Command not included in the PATH environment variable.

发布于 2017/03/20 11:25 1,714浏览 0回复 558

在修改了~/.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

问题即解决。

点赞(0)
点了个评