Answer the question
In order to leave comments, you need to log in
NPM Access Denied, although I run from sudo. How to fix?
During npm install phantomjs -g:
```
Phantom installation failed { Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1498198903964/phantomjs-2.1 .1-linux-x86_64' -> '/usr/local/lib/node_modules/phantomjs/lib/phantom'
errno: -13,
code: 'EACCES',
syscall: 'link',
path: '/tmp/phantomjs/ phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1498198903964/phantomjs-2.1.1-linux-x86_64',
dest: '/usr/local/lib/node_modules/phantomjs/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1498198903964/phantomjs-2.1.1-linux-x86_64' -> '/usr/local/lib/ node_modules/phantomjs/lib/phantom'
```
In this case, the whoami command gives the output:
```
root
```
i.e. there should be no problems with rights. How to decide?
Answer the question
In order to leave comments, you need to log in
Try sudo erm -Rf /tmp , then sudo npm cache clear and reinstall
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question