You can 'sudo apt-get install npm', or you can reinstall node from source. Note, when you install from deb or rpm packages, they can place npm in a different location than when you build and install from source. For example on rhel, the rpm installs it to /usr/bin/npm whereas building from source will put it under /usr/local/bin/npm.
Unless you need to deploy lots of servers in a more-or-less automated way, I'd recommend reinstalling node from the source tarball and then 'sudo npm install n' for node version management. Or if you prefer, the nvm node version manager. On Sunday, June 8, 2014 6:23:16 PM UTC-4, wgw wrote: > > My npm was corrupt, so I uninstalled it (in Ubuntu : sudo npm uninstall > npm -g). Originally, I had installed it from sources (using sudo) and then > updated nodejs with npm, but I think the update may have left npm in a > corrupt state. At any rate, I had problems using npm install with or > without sudo. > > What is the best option? Should I try to reinstall npm or just start all > over again, with a new install of nodejs? Without npm, it is hard to know > where everything is installed! But I do have the original src. Could I do a > sudo > make uninstall in the src directory (as suggested here: > https://github.com/npm/npm)? > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/6fcf4a4e-e807-4124-a334-adfbac26d49a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
