簡體   English   中英

在ec2上安裝npm返回127錯誤

[英]Installing npm on ec2 returns 127 error

我正在嘗試在Amazon EC2實例上安裝npm。

我已經在實例中安裝了git和node.js

我打的是這些

git clone git://github.com/joyent/node.git
cd node
git checkout v0.10.20
./configure
make
sudo make install
git clone https://github.com/isaacs/npm.git
cd npm
sudo make install

但最終會出現此錯誤

rm -rf \
    .building_ronn \
    html/doc \
    html/api \
    man
scripts/doc-build.sh doc/api/npm-test.md man/man3/npm-test.3
make[1]: Entering directory `/home/ec2-user/npm'
node cli.js install ronn --no-global
bash: node: command not found
make[1]: *** [node_modules/.bin/ronn] Error 127
make[1]: Leaving directory `/home/ec2-user/npm'
make: *** [man/man3/npm-test.3] Error 2

該問題的命令進度與2012年編寫的如何在Amazon EC2上安裝和設置Node.js有關 ,並且不承認npm現在已與node.js捆綁在一起。 您可以鍵入which npm來查看它是否已經安裝,然后安全地rm -rf npm/殘余npm文件夾。

(如果使用sudo npm結果導致command not found ,則可能需要設置符號鏈接,如下所示: https : //stackoverflow.com/questions/4976658/on-ec2-sudo-node-command-not-found-but-node -without-sudo-is-ok / 5062718#5062718

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM