我想执行命令gclient。我已经将其位置包含在PATH中。但是我不能通过命令直接执行它。有人可以告诉我为什么吗?
~
❯ echo $PATH
/User/merle/depot_tools:/Users/merle/.nvm/versions/node/v11.10.0/bin:/usr/local/opt/mysql@5.5/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
~
❯ ls depot_tools | grep gclient
README.gclient.md
annotated_gclient.py
gclient
gclient-new-workdir.py
gclient.bat
gclient.py
gclient_completion.sh
gclient_eval.py
gclient_paths.py
gclient_scm.py
gclient_utils.py
~
❯ gclient
zsh: command not found: gclient
~
❯ cd depot_tools
~/depot_tools master
❯ ./gclient
Usage: gclient.py <command> [options]
Meta checkout dependency manager for Git.
Commands are:.......
答案 0 :(得分:1)
再看看您的路径:
export PATH=/User/merle/depot_tools:/Users/merle/...
您的系统仅包含1个用户还是多个用户?
它应显示为:
export PATH=/Users/merle/depot_tools:/Users/merle/...
答案 1 :(得分:0)
我认为您可能会忘记
source ~/.nvm/nvm.sh
如果要自动加载,有两种方法
open ~/.zshrc
1.add
source ~/.nvm/nvm.sh
2。或添加
export NVM_DIR="/Users/YOUR_USER_NAME(you need use you user name)/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
希望这可以为您提供帮助