Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax error: newline unexpected node.js rpm

Tags:

linux

node.js

I am running node.js on my Linux Debian server and am having problems running a .sh script trying to install RPM.

The command is:
curl http://npmjs.org/install.sh | sh

The script is a supported install RPM package.

-bash: sh: Syntax error: newline unexpected

Can anyone help me fix this?

like image 244
minhthuan Avatar asked Aug 15 '12 09:08

minhthuan


2 Answers

Use this:

curl -k https://npmjs.org/install.sh | sudo sh

Note: npm included in new versions of node.js. No need to install it separately now.

like image 164
Vadim Baryshev Avatar answered Sep 30 '22 11:09

Vadim Baryshev


Try:

curl -O https://www.npmjs.org/install.sh
sudo sh install.sh

Inspired by this.

like image 24
randwa1k Avatar answered Sep 30 '22 11:09

randwa1k