我正在 Vagrant 上工作。当我运行命令时vagrant up
,它显示:
Command 'vagrant' is available in '/usr/bin/vagrant'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
vagrant: command not found
答案1
这是因为 PATH。看起来你的 PATH 变量被搞乱了。
检查环境文件:
sudo vi /etc/environment
并确保文件类似于:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"