[英]ZSH: Command not found - after update macOS to 10.15.1
Yesterday I was using all my installed packages without any problem such as mysql
, composer
, php
, brew
and co...昨天我使用了所有已安装的软件包,没有任何问题,例如
mysql
, composer
, php
, brew
和 co ...
However, today I started my MacBook and typed mysql
and I got: zsh: command not found: mysql
.但是,今天我启动我的 MacBook 并输入
mysql
并得到: zsh: command not found: mysql
。 Not even brew
is working anymore and I don't know why.. this is my .zshrc
config file and I don't know why it isn't working.甚至
brew
都不再工作了,我不知道为什么..这是我的.zshrc
配置文件,我不知道它为什么不工作。
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:~/.composer/vendor/bin:$PATH
Any ideas how to fix this?任何想法如何解决这一问题?
Yuck, how did that happen?呸,怎么会这样? Try this:
尝试这个:
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
export PATH
Whether this works is going to depend on where you have been installing user executables.这是否有效取决于您安装用户可执行文件的位置。 If you're using homebrew, I would expect it to be
/usr/local/bin
but perhaps it is something different in your case?如果您使用的是自制软件,我希望它是
/usr/local/bin
但在您的情况下可能有所不同? You might want to try putting /usr/local/bin
first so things installed by homebrew get picked up before the defaults in /usr/bin
and /bin
(this is what I do, and I'm still alive to talk about it...)您可能想尝试先放置
/usr/local/bin
,以便在/usr/bin
和/bin
中的默认值之前获取由 homebrew 安装的东西(这就是我所做的,我还活着谈论它。 ..)
You could also change your default shell back to Bash:您还可以将默认 shell 更改回 Bash:
brew install bash
echo '/usr/local/bin/bash' >> /etc/shells
chsh
You might need to use sudo
on line 2.您可能需要在第 2 行使用
sudo
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.