安装使用下面的命令NPM的安装问题的Ubuntu 11.04
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用的方式没有特殊的代理/防火墙的网络。
试图curl -s -L http://registry.npmjs.org/npm/latest
我得到{"error":"ucs","reason":"{bad_utf8_character_code}"}
这可能暗示一个NPM方面的问题?
拉尔夫
但是考虑到这会安装最新版本的节点,并且可能会破坏兼容性。例如,当运行lesscss时,它可能需要节点0.4.12,而在编写thios注释时,自动下载的版本是0.7.9。看到这篇文章:http://stackoverflow.com/questions/7717623/getting-an-error-when-running-the-less-css-compiler-in-node-js – 2012-05-22 20:51:56