Node.js : NPM Install Fails

前端 未结 2 504
南笙
南笙 2021-02-02 01:11

I get this error if I run

curl http://npmjs.org/install.sh | sh

even with sudo.

    cirk@cirk-Parallels-Virtual-Platform:~$ cu         


        
相关标签:
2条回答
  • 2021-02-02 01:46

    I screwed up the permissions on my npm installation, and had this error when reinstalling. I solved it in the crudest way: by liberally sudo rm -rfing any directory tree that gave me trouble, then recompiling node.js and reinstalling npm.

    If all else fails, you could fall back to that.

    0 讨论(0)
  • 2021-02-02 01:56

    Why are you running that in /usr?

    If you really need to, this page suggests you may run that as root, so that would be:

    curl https://www.npmjs.com/install.sh | sudo sh
    

    But you better make sure it won't break your system, before running that.

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