Unable to resolve "E: Unable to correct problems, you have held broken packages."
6,280
It looks like that version of npm isn't supported any more, updating node (and npm with it) resolved the issue.
First, uninstall the outdated version (optional, but I think this fixed an issue I was having with global modules not being pathed in).
sudo apt-get purge nodejs npm
Then install from Chris Lea's repo:
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
Comments
-
Ashwini Cherukuri almost 2 years
In Ubuntu 12.04,I am trying to install less and handlers using npm.While installing npm I found this error
sudo apt-get install npm 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: nodejs-dev (>= 0.4) E: Unable to correct problems, you have held broken packages.
Please help me to resolve this issue. Thanks for the helping me.
-
karel over 9 yearsWhere did your Node.js (package name nodejs) come from? Ubuntu Software Center, a PPA or did you download it and install it?
-
Ashwini Cherukuri over 9 yearsYes,I found it on net to install node,npm,less and handlebars
-
-
Ashwini Cherukuri over 9 yearsAlready I tried this one and still i had a issue
-
Autoresponder over 7 yearssudo apt-get install aptitude first. then sudo aptitude install <your node package>. Accept the solution aptitude throws at you by typing y