Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS 下命令 "brew update" 發生 Error: /usr/local is not writable. #12

Open
mvpdw06 opened this issue Nov 8, 2016 · 0 comments
Open

Comments

@mvpdw06
Copy link
Owner

mvpdw06 commented Nov 8, 2016

步驟

以我的 Terminal 為例,出現這個 Error 的時候出現以下訊息:

~ ─> ><}}*> brew update
Error: /usr/local is not writable. You should change the ownership
and permissions of /usr/local back to your user account:
sudo chown -R $(whoami) /usr/local

那麼直接跟著上面的說明,使用指令

sudo chown -R $(whoami) /usr/local

如果你的 bash shell 是用 fish 的話,還會出現一個問題

~ ─> ><}}*> sudo chown -R $(whoami):admin /usr/local/
$(...) is not supported. In fish, please use '(whoami)'.
fish: sudo chown -R $(whoami):admin /usr/local

意思就是 fish 不支援 $ 符號,故只要把 $ 拿掉即可。

~ ─> ><}}*> sudo chown -R (whoami) /usr/local/

然後就會要你輸入密碼,就完成了解決步驟

接下來只要重新下 brew update 即可

~ ─> ><}}*> brew update

即可完成更新。

接下來就可以安裝你想安裝的新套件囉!(ex: Yarn)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant