What is the best/safest way to reinstall Homebrew?

前端 未结 6 1637
一向
一向 2020-12-02 06:21

I am getting issues with permissions in Homebrew: After I installed Node and tried to install npm using the curl command Homebrew tells you to use, it would fail due to EACC

6条回答
  •  死守一世寂寞
    2020-12-02 06:28

    For Mac OS X Mojave and above

    To Uninstall Homebrew, run following command:

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

    To Install Homebrew, run following command:

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

    And if you run into Permission denied issue, try running this command followed by install command again:

    sudo chown -R $(whoami):admin /usr/local/* && sudo chmod -R g+rwx /usr/local/*
    

提交回复
热议问题