Mac 报错 zsh: command not found: 解决方法
一、报错
(base) ➜ ~ docker pull rabbitmq:3.8.9-management
zsh: command not found:docker pull rabbitmq:3.8.9-management
在网上找了很多解决的方法,都不起作用,后来还是去官网下找到了解决方法。
二、解决方法
ninstalling and re-installing homebrew didn't work, but I did the following which worked for me.
Open the text ~/.zshrc
file in text editor like vim or similar. Then, uncomment the export line for the below section. Source your file like so source ~/.zshrc
(base) ➜ ~ open ~/.zshrc
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
重新加载:
source ~/.zshrc
然后就可以安装了:
base) ➜ ~ docker pull rabbitmq:3.8.9-management
3.8.9-management: Pulling from library/rabbitmq
f22ccc0b8772: Downloading
3cf8fb62ba5f: Downloading
e80c964ece6a: Downloading
参看文献:
https://superuser.com/questions/1460426/mac-terminal-zsh-command-not-found
https://github.com/ohmyzsh/ohmyzsh/issues/3507
为者常成,行者常至
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)