7

使用以下命令安装新节点

sudo apt-get install git-core curl build-essential openssl libssl-dev
git clone https://github.com/joyent/node.git && cd node
./configure 
make
make install
node -v
v0.5.0-pre

工作没有故障。当我尝试安装 NPM 时,我得到:

>/tmp/node$ curl http://npmjs.org/install.sh | sudo sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3874  100  3874    0     0   3033      0  0:00:01  0:00:01 --:--:-- 22923
fetching: 

gzip: stdin: unexpected end of file
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
It failed
>

我正在使用没有特殊代理/防火墙的 VirtualBox NAT 网络。

尝试我得到 这可能暗示 NPM 方面的问题?curl -s -L http://registry.npmjs.org/npm/latest{"error":"ucs","reason":"{bad_utf8_character_code}"}

拉尔夫

4

2 回答 2

12

尝试这个:

git clone http://github.com/isaacs/npm.git
cd npm
sudo make install
于 2011-06-17T09:13:40.193 回答
0

目前 NPM 注册表似乎存在问题 - 我遇到了同样的错误,使用 git 安装,然后发现注册表也已关闭。

有关注册表关闭的更多信息,请参阅https://github.com/isaacs/npm/issues - 整个 NPM 可能存在问题。

于 2011-06-17T09:29:56.393 回答