提示错误内容见下

mkdir: /usr/local/var/homebrew/locks: Permission denied
Error: Can’t create update lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
sudo chown -R $(whoami) /usr/local/var/homebrew

解决方法

步骤1:

sudo mkdir

步骤2:

sudo mkdir

步骤3:

sudo chown -R $(whoami)

重新更新操作,指令 update 与 up 一样

brew up

输出下面内容,表示成功

Already up-to-date.