Error when trying to “brew link autoconf”

南笙酒味 提交于 2019-12-02 19:06:44
SethMMorton

You need to make sure that all the files and folders in /usr/local are writable by you. You can do this by typing the following command

chown -R yourusername /usr/local
chmod -R u+w /usr/local

You may have to use sudo for those commands to work.

After you do this, try linking again.

(sudo) chown -R yourusername /usr/local

I had to run

chmod -R u+w /usr/local
brew link --overwrite autoconf
brew install htop

I tried under /usr/local/share/emacs/

sudo chmod 777 site-lisp

and then

brew link autoconf

and problem solve!

mac@Anna_mac : /usr/local/share/emacs : brew link autoconf Linking /usr/local/Cellar/autoconf/2.69... 22 symlinks created

I had to run the following commands

chown -R yourusername /usr/local
chmod -R u+w /usr/local
brew link --overwrite autoconf
bwlee

You just need to change brew owned by root.

then you can use below command.

sudo brew link xxxx

Quote from github, this is not a bug, it is designed:

jacknagel commented on 4 Feb 2012

brew install will not work with root privileges unless brew itself is owned by root. @jacknagel Collaborator jacknagel commented on 4 Feb 2012

(this is by design.)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!