【问题标题】:NPM install issues Ubuntu 11.04 [closed]NPM 安装问题 Ubuntu 11.04 [关闭]
【发布时间】:2011-09-17 00:36:54
【问题描述】:

使用以下命令安装新节点

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 @987654321@ 我得到{"error":"ucs","reason":"{bad_utf8_character_code}"}
这可能暗示 NPM 方面存在问题?

拉尔夫

【问题讨论】:

  • 但是考虑到这个安装的是最新版本的node,可能会破坏兼容性。例如,在运行 lesscss 时可能需要节点 0.4.12,而在撰写 thios 评论时,自动下载的版本是 0.7.9。看到这个帖子:stackoverflow.com/questions/7717623/…

标签: ubuntu node.js tar npm


【解决方案1】:

试试这个:

git clone http://github.com/isaacs/npm.git
cd npm
sudo make install

【讨论】:

  • 太棒了——这给了我一个正常工作的 NPM。但是我仍然迷路了,因为在 URL registry.npmjs.org/npm 下没有工作存储库
【解决方案2】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-12-07
    • 2011-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-11
    • 1970-01-01
    相关资源
    最近更新 更多