Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
sudo npm install -g npm 无反应
Apps Section
940
views ·
2
replies ·
To
floor
Go
tyrion
deepin
2019-02-23 08:25
Author
今天刚在virtual box上安装了最新的deepin 15.9
在使用上遇到一个问题。
我安装nodejs 和npm
在终端上使用了命令:sudo apt-get install nodejs npm
顺利安装上了v8.11.2版本的nodejs和5.5.1版本的npm
在我准备全局安装一些node包时,就没反应了。
----------------------
lhf@lhf-PC:~/demo$ sudo npm install -g gulp
lhf@lhf-PC:~/demo$ npm install -g gulp
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lhf/.npm/_logs/2019-02-22T16_20_53_043Z-debug.log
lhf@lhf-PC:~/demo$
-------------------------------
终端里操作是这样子的。
我在网上查了好些时间,没能解决。
有人能帮忙解决一下么?
Reply
Like 0
Favorite
View the author
All Replies
gionna
deepin
2019-03-22 00:25
#1
哥们,解决这个问题了吗,我也遇到这个问题,不知道怎么解决~
Reply
Like 0
View the author
whitetrident
deepin
2019-03-22 18:02
#2
全局安装是有问题,建议先下nvm,然后nvm装node,可以自动帮你配好全局环境,linux装nvm还是很简单的,一行代码搞定
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
Nuntia - Modern IMAP/SMTP mail client for Deepin (Beta tester wanted!)
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
Taskbar no longer shows popups
Four agent skills for laptop power, sleep, and honest bug reports
Popular Events
More
在使用上遇到一个问题。
我安装nodejs 和npm
在终端上使用了命令:sudo apt-get install nodejs npm
顺利安装上了v8.11.2版本的nodejs和5.5.1版本的npm
在我准备全局安装一些node包时,就没反应了。
----------------------
lhf@lhf-PC:~/demo$ sudo npm install -g gulp
lhf@lhf-PC:~/demo$ npm install -g gulp
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lhf/.npm/_logs/2019-02-22T16_20_53_043Z-debug.log
lhf@lhf-PC:~/demo$
-------------------------------
终端里操作是这样子的。
我在网上查了好些时间,没能解决。
有人能帮忙解决一下么?