can't brew install node

后端 未结 12 1082
无人及你
无人及你 2020-12-13 06:35

I am trying to upgrade my node via homebrew but ran into a problem because I think I tried to download through the website. I am very new to terminal. I\'ve tried to search

12条回答
  •  生来不讨喜
    2020-12-13 07:01

    I ran into this problem on a new MacBook Pro on Mac OS High Sierra. I gleaned brew was trying to use directories named include and lib under /usr/local that was not there. Since root owns /usr I had to do it manually - making sure that whoami owner matches peer directories in /usr/local:

    sudo mkdir /usr/local/include
    chown `whoami`:admin /usr/local/include 
    sudo mkdir /usr/local/lib
    chown `whoami`:admin /usr/local/lib
    

    And then to match the other directories in /usr/local I did:

    chmod 775 /usr/local/include
    chmod 775 /usr/local/lib
    

    then the following worked:

    brew uninstall node 
    brew install node
    

提交回复
热议问题