Installing in Homebrew errors

后端 未结 8 2012
遥遥无期
遥遥无期 2020-12-04 05:38

Attempting to install rvm and ruby 1.9.2

I already installed homebrew and git, but couldn\'t get complete updates because I kept getting permission errors. Re-install

相关标签:
8条回答
  • 2020-12-04 06:27

    I had this issue after upgrading to Mavericks, and this page was the top search result when googling the error message. I continued searching and found this answer on stack overflow.com. Put concisely, it is:

    sudo chmod a+w /usr/local/Cellar
    

    This fixed the issue for me, and as it only changes permissions for the specific path referenced in the error message, seemed unlikely to have negative side effects with other installations.

    I'm putting this answer here for anyone else who may find this page first like I did. However, credit should go to jdi.

    0 讨论(0)
  • 2020-12-04 06:37

    sudo chown -R $USER /usr/local

    You'll have to give yourself ownership of /usr/local/ using that line right there. I had to do this myself after using the ruby one-liner at the top of the official docs to install Homebrew. Worked like a charm for me. It ought to be the only time you'll ever need to sudo with Homebrew.

    I'm not sure if the ruby one-liner does this. If it did, then something else on my system took control of /usr/local since.

    Edit: I completely missed this, but @samvermette didn't (see replies to my answer): if you run this command above and have something installed via homebrew that requires special user permissions, like mysql, make sure to give those permissions back (as the above command gives recursive ownership to everything inside /usr/local to you ($USER). In the case of mysql, it's…

    sudo chown -RL mysql:mysql /usr/local/mysql/data

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