macOS 安装istats zsh: command not found: istats

现象

已经成功安装了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

猜你喜欢

转载自blog.csdn.net/lxyoucan/article/details/121350989