在linux系统下安装不了npm,一直报错
发布于 5 天前 作者 bykege 217 次浏览 来自 问答

[root@wind nodeExap]# curl http://npmjs.org/install.sh | sudo sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 193 100 193 0 0 50 0 0:00:03 0:00:03 --:–:-- 0 sh: line 1: html: No such file or directory sh: line 2: syntax error near unexpected token <' 'h: line 2:<head><title>301 Moved Permanently</title></head>

这是错误提示

6 回复

@bykege npm是node自带的包,安装好node就可以有npm了 linux下如何安装node. 可以参考: http://blog.3gcnbeta.com/2015/07/13/在Linux下正确安装node-2Fiojs的姿势/

@bykege https://npmjs.org 301 重定向到 https://www.npmjs.com 了 试试 curl http://www.npmjs.com/install.sh | sudo sh

不建议这么安装,建议直接使用系统的包管理器来安装,如果源里的版本不符合你的要求,那么可以考虑使用nvm来安装 看看这个吧 http://fengmk2.com/blog/2014/03/node-env-and-faster-npm.html

回到顶部