Homebrew: Could not symlink, /usr/local/* is not writable

When I used the Homebrew to install RabbitMQ,get the errors ❌:

The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink .
/usr/local/opt is not writable.

You can try again using:
  brew link jpeg

but when do this, the error :

brew link jpeg
Linking /usr/local/Cellar/jpeg/9b... 
Error: Could not symlink .
/usr/local/opt is not writable.

so, do as this, like the pic:

$ sudo chown -R `whoami`:admin /usr/local/opt

這裏寫圖片描述

you may need to do:

$ sudo chown -R `whoami`:admin /usr/local/share

You may receive the following error
這裏寫圖片描述

so, do this:

$ echo 'export PATH="/usr/local/opt/erlang@19/bin:$PATH"' >> ~/.bash_profile
$ brew link erlang@19 --force

You can install rabbitmq without error,

$ brew install rabbitmq

run the $ brew doctor, can get this info:

這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章