LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2017, 03:35 PM   #1
Panicked
LQ Newbie
 
Registered: Jun 2017
Posts: 21

Rep: Reputation: Disabled
npm install latest broke npm


This seems to be a widely reported problem. Are there any fixes?

admin> sudo npm install npm@latest -g
ERR! path usr/lib/node_modules/npm
ERR! code EACCES
ERR! errno -13
ERR! syscall access
ERR! Error: EACCES: permission denied ???

admin> ll usr/lib/node_modules/npm
drwxr-xr-x. 4 root root 4096 Jun 14 node_modules

admin> sudo npm - v
/usr/bin/npm: No such file or directory

admin> sudo curl -L http://npmjs.org/install.sh | sudo sh
fetching: https://registry.npmjs.org/npm/-/npm-5.0.3.tgz
added 1 package and removed 84 packages in 2.082s
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
+ npm@5.0.3
added 1 package in 1.345s
It worked

admin> sudo npm - v
/usr/bin/npm: No such file or directory

... It did not seem to work very well?!

Last edited by Panicked; 06-14-2017 at 03:41 PM.
 
Old 06-14-2017, 03:52 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if you are already root ???

i am guessing that from " admin> "

then WHY are you using "sudo" ???

also DO NOT use "rpm" to install a rpm package
use your package manager ( yum, dnf , or zypper )

then there is this error you posted
Quote:
ERR! Error: EACCES: permission denied ???
did you even read that ?
 
Old 06-14-2017, 03:57 PM   #3
Panicked
LQ Newbie
 
Registered: Jun 2017
Posts: 21

Original Poster
Rep: Reputation: Disabled
admin was made a sudoer during CentOS install, but the username was not saved to /etc/sudoers - not a biggie.

I did read the error. I also typed the error. Why would permission be denied?

admin> yum install npm
You need to be root to perform this command

admin> sudo yum install npm
Package 1: npm already installed
Nothing to do

admin> npm -v
/usr/bin/npm: No such file or directory

admin> sudo yum remove npm
admin> sudo yum install npm
admin> npm -v
3.10.10

yum installs 3.1, and the current tgz filename suggests latest is is 5.0 (maybe there is a sensible reason for that?)

Last edited by Panicked; 06-14-2017 at 04:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Install npm on Ubuntu 16.04 LXer Syndicated Linux News 0 12-29-2016 09:00 AM
LXer: A Redis-based microservice in bash for automating git clone and npm install LXer Syndicated Linux News 0 04-03-2016 03:42 PM
LXer: NPM creator starts a company to offer npm-related products and services LXer Syndicated Linux News 0 01-17-2014 09:50 AM
[SOLVED] npm binary yashfire007 Linux - Newbie 4 05-15-2013 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration