Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install NPM on linux

My purpose is to install angularjs !

For that i need => npm,so I want to install nodejs for having "NPM" but i have this error :

File "./configure", line 16, in <module>
from gyp.common import GetFlavor
File "./tools/gyp/pylib/gyp/__init__.py", line 8, in <module>
import gyp.input
File "./tools/gyp/pylib/gyp/input.py", line 873
except ImportError as e:

Probably the problem is the version of python 2.5 : The problem is i don't have right to update python.

PLZ, how can i install npm on linux without Nodejs

Helps appreciated.

Regards

like image 729
katy Avatar asked Mar 15 '23 08:03

katy


1 Answers

First update your system's package and make sure you have newest versions of packages and their dependencies.

sudo apt-get update

Then install npm(and/or nodejs if needed)

sudo apt-get install npm nodejs 

Finally, you may install angular with following command

npm install angular

FYI, The best way to install npm is to install node using the node.js installer. npm is installed as part of node.

like image 104
nalinc Avatar answered Mar 24 '23 03:03

nalinc