JavaEar 专注于收集分享传播有价值的技术资料

Error when trying to "brew link autoconf"

问题描述


英文原文

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/local/share/emacs is not writable. You should change its permissions.

Anyone have any ideas on how to fix this? Thanks!


中文翻译

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/local/share/emacs is not writable. You should change its permissions.

Anyone have any ideas on how to fix this? Thanks!

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/local/share/emacs is not writable. You should change its permissions.

Anyone have any ideas on how to fix this? Thanks!

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/local/share/emacs is not writable. You should change its permissions.

Anyone have any ideas on how to fix this? Thanks!

6个回答

    最佳答案

  1. 英文原文

    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.


    中文翻译

    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.

  2. 参考答案2

  3. 英文原文

    I had to run

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

    中文翻译

    I had to run

    chmod -R u+w /usr/local
    brew link --overwrite autoconf
    brew install htop
    
  4. 参考答案3
  5. 参考答案4

  6. 英文原文

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

  7. 参考答案5

  8. 英文原文

    I had to run the following commands

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

    中文翻译

    I had to run the following commands

    chown -R yourusername /usr/local
    chmod -R u+w /usr/local
    brew link --overwrite autoconf
    
  9. 参考答案6

  10. 英文原文

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


    中文翻译

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