Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 在位置2安装带有NVM不匹配支架的NPM_Linux_Node.js_Npm_Nvm - Fatal编程技术网

Linux 在位置2安装带有NVM不匹配支架的NPM

Linux 在位置2安装带有NVM不匹配支架的NPM,linux,node.js,npm,nvm,Linux,Node.js,Npm,Nvm,我正在努力安装NPM,但遇到了错误。以下是我尝试的地方: b-2:bin X$ nvm use v0.4.12 Now using node v0.4.12 b-2:bin X$ curl https://npmjs.org/install.sh | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload

我正在努力安装NPM,但遇到了错误。以下是我尝试的地方:

b-2:bin X$ nvm use v0.4.12
Now using node v0.4.12
b-2:bin X$ curl https://npmjs.org/install.sh  | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7882  100  7882    0     0  17347      0 --:--:-- --:--:-- --:--:-- 22140
tar=/usr/bin/tar
version:
bsdtar 2.8.3 - libarchive 2.8.3
install npm@1.0
fetching: {
curl: (3) [globbing] unmatched brace at pos 2
npm-install-30810.sh: line 228: cd: /var/folders/g_/kythn1dx4fbbry5npb4jx1cr0000gn/T//npm.30813/*: No such file or directory
It failed

你知道为什么NPM没有安装吗?感谢节点0.4.x,您需要NPM1.0.x,但是

npm 1.0似乎不再在npmjs.org上提供。安装脚本install.sh正在尝试下载元数据json文件,该文件现在包含:

{"error":"version not found: 1.0"}
但您仍然可以从头开始构建它—从github克隆1.0分支:

$ git clone https://github.com/isaacs/npm.git npm
$ cd npm
$ git checkout 1.0
$ ./configure
$ make
$ make install
$ npm -v
1.0.106