Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nodejs is installed but not NPM

Tags:

npm

I have installed nodejs on ubuntu 15.10 :

sudo apt-get install nodejs

npm should come with nodejs but when I do npm -v, it says that it is not installed. So I have tried to install it :

sudo apt-get install npm

but I am getting :

The following packages have unmet dependencies: npm : Depends: nodejs but it is not going to be installed
Depends: nodejs-dev
Depends: node-request but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-abbrev but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-fstream but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed E: Unable to correct problems, you have held broken packages.

If anyone knows how to solve this,...

Thank you

like image 860
user1260928 Avatar asked Dec 01 '25 22:12

user1260928


1 Answers

Can you try to

sudo apt-get install --reinstall nodejs

and post any errors and/or version of nodejs after reinstall.

like image 195
alexey Avatar answered Dec 05 '25 22:12

alexey