Not able to install npm on Ubuntu

+1 vote

I am trying to install using this command:

sudo apt-get install npm

But I am getting this error:

Reading package lists... Done

Building dependency tree      

Reading state information... Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:


The following packages have unmet dependencies:

 npm : Depends: node-gyp (>= 0.10.9) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.
Nov 28, 2018 in Linux Administration by digger
• 27,620 points
891 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try installing npm using aptitude:

sudo apt install aptitude
sudo aptitude install npm
answered Nov 28, 2018 by Omkar
• 65,850 points

Related Questions In Linux Administration

0 votes
1 answer

Not able to install sublime text editor

Delete the following file: /etc/apt/sources.lits.d/sublime-text.list and then try to ...READ MORE

answered Feb 18 in Linux Administration by Joe
45 views
0 votes
1 answer

Error when trying to install a few packages on ubuntu

Try executing the following commands and try ...READ MORE

answered Mar 15 in Linux Administration by Jobin
37 views
0 votes
1 answer

Not able to access /etc/sudoers.d/python file

I think your system is not allowing ...READ MORE

answered Feb 6 in Linux Administration by Lohit
35 views
0 votes
1 answer

How to uninstall Apache2 on Ubuntu?

Hey @Laksha, execute the following commands: $ sudo ...READ MORE

answered May 13 in Linux Administration by Hemant
7 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,200 points
50 views
0 votes
1 answer

Error installing npm

Npm depends on NodeJS to run/get installed. ...READ MORE

answered Feb 8 in Linux Administration by Omkar
• 65,850 points
21 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22 in Database by Nitesh
16 views
0 votes
1 answer

How to check version of package installed by npm?

These commands are used to check the ...READ MORE

answered Feb 4 in Linux Administration by Omkar
• 65,850 points
52 views
+2 votes
2 answers

Ubuntu installing problem

Hey Prince! This seems to be like a ...READ MORE

answered Oct 15, 2018 in Linux Administration by Omkar
• 65,850 points

edited Oct 15, 2018 by Kalgi 37 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.