Monday, 22 May 2017

Error while installing NPM in ec2 Linux aws?

I am following the steps as:

Update, install the compiler and git

$ sudo yum update 
$ sudo yum install gcc-c++ make 
$ sudo yum install openssl-devel 
$ sudo yum install git

Install nodejs

$ git clone git://github.com/joyent/node.git
$ cd node
$ git checkout v0.10.32
$ ./configure
$ make
$ sudo make install

Add node to sudo’s path

$ sudo su
$ nano /etc/sudoers
# Add :/usr/local/bin to the end of this line:
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
$ ctrl + x and save
$ exit

Install NPM

$ cd
$ git clone https://github.com/isaacs/npm.git
$ cd npm
$ sudo make install  //The problem displayed here....

When I ran sudo make install after all the above following commands, it displays an error as displayed below in the terminal:

[root@ip-172-31-11-23 npm]# sudo make install
scripts/doc-build.sh doc/cli/npm-install-test.md man/man1/npm-install-test.1
make[1]: Entering directory `/root/npm'
node cli.js install marked-man --no-global --no-timing
bash: node: command not found
make[1]: *** [node_modules/.bin/marked-man] Error 127
make[1]: Leaving directory `/root/npm'
make: *** [man/man1/npm-install-test.1] Error 2

And hence I am unable to install npm.



via Aditya Jain

No comments:

Post a Comment