can't brew install node

后端 未结 12 1093
无人及你
无人及你 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 06:49

    I had the same error:

    Linking /usr/local/Cellar/node/11.10.0...
    Error: Could not symlink include/node /usr/local/include is not writable.
    

    Solution:

    $ sudo mkdir /usr/local/include
    $ sudo chown -R $(whoami) $(brew --prefix)/*
    $ brew link node
    

    Linking /usr/local/Cellar/node/11.10.0... 7 symlinks created

    $ node -v => v11.10.0

    $ npm -v => 6.7.0

提交回复
热议问题