简体   繁体   中英

Installing/updating npm & NodeJS

I have an old version of NPM and NodeJS installed on my AWS server. I really just need bower to work to install a module. npm version is 1.1.0-2. Node version is 0.6.8.

sudo npm install -g npm

Results in:

npm ERR! System Linux 3.10.42-52.145.amzn1.x86_64
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "npm"
npm ERR! cwd /home/ec2-user/node-v0.10.33-linux-x64
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! message failed to fetch from registry: npm

Also tried NodeJS from source. README says use the usual ./configure, make, make install. Caveat: no configure script. :-/

Ready to throw my hands up.

请尝试在终端中运行以下命令:

curl https://www.npmjs.org/install.sh | sh

Okay, the source code eventually did work. I had downloaded the binaries by mistake. (Odd that they come w/ a README telling you how to build the source code).

Hoping anyone else looking to upgrade can learn something from this.

Anywho, I'm good on this for now. Thanks for the input.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM