Homebrew install fails while copying files

后端 未结 4 1487
醉梦人生
醉梦人生 2021-02-19 02:18

I run this:

/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"

I get prompt:



        
相关标签:
4条回答
  • 2021-02-19 02:19

    I ran into the error message issue trying to update Brew via another Mac user. When I tried entering the above sudo chown -R $USER /usr/local I got:

    chown: /usr/local: Operation not permitted
    

    I found this sudo chown -R $(whoami) $(brew --prefix)/* which allowed me to perform install of brew for separate Mac user.

    0 讨论(0)
  • 2021-02-19 02:22

    You are getting permission denied when downloading the files into /usr/local.

    This folder often belongs to root. This is a known issue with brew. Fix it by doing

    sudo chown -R $(whoami) $(brew --prefix)/*
    

    and then re-run the installer.

    0 讨论(0)
  • 2021-02-19 02:37

    If nothing works, then just uninstall and install home-brew again.

    Uninstall command:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
    

    Install command:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
    0 讨论(0)
  • 2021-02-19 02:46

    I could get it working with

    sudo chown -R $USER /usr/local
    

    thanks to @joran for suggesting this in comments

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