Error when trying to “brew link autoconf”

后端 未结 6 566
终归单人心
终归单人心 2021-02-01 19:38

When I try to \"brew link autoconf\" in the terminal I keep getting this error.

Error: Could not symlink file: /usr/local/Cellar/autoconf/2.69/share/emacs/site-lisp /usr

相关标签:
6条回答
  • 2021-02-01 19:52

    I had to run

    chmod -R u+w /usr/local
    brew link --overwrite autoconf
    brew install htop
    
    0 讨论(0)
  • 2021-02-01 19:54

    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.)

    0 讨论(0)
  • 2021-02-01 20:03

    (sudo) chown -R yourusername /usr/local

    0 讨论(0)
  • 2021-02-01 20:06

    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

    0 讨论(0)
  • 2021-02-01 20:12

    I had to run the following commands

    chown -R yourusername /usr/local
    chmod -R u+w /usr/local
    brew link --overwrite autoconf
    
    0 讨论(0)
  • 2021-02-01 20:13

    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.

    0 讨论(0)
提交回复
热议问题