现象
已经成功安装了istats,但是仍然提示zsh: command not found: istats
sudo gem install iStats
Fetching iStats-1.6.1.gem
Building native extensions. This could take a while...
Successfully
~ ? istats
zsh: command not found: istats
解决办法
gem uninstall iStats
gem install iStats --user-install
在环境变量中(vim ~/.zshrc )增加:
export PATH="/Users/itkey/.gem/ruby/3.0.0/bin:$PATH"
source ~/.zshrc
现在在输入istats 就可以正常运行了。
参考
https://apple.stackexchange.com/questions/363225/command-istats-gives-bash-istats-command-not-found-after-gem-install-ist
|