“Error: ETXTBSY” when installing the package with npm (gruntjs, gulp) at VirtualBox

戏子无情 提交于 2020-02-02 15:45:30

问题


I tried to install gruntjs package via npm, but the command

npm install grunt --save-dev

received an error:

npm ERR! error rolling back Error: ETXTBSY, unlink   '/home/me/www/public_html/test/try/node_modules/grunt/node_modules/lodash/lodash.js'
npm ERR! error rolling back  grunt@0.4.4 { [Error: ETXTBSY, unlink '/home/me/www/public_html/test/try/node_modules/grunt/node_modules/lodash/lodash.js']
npm ERR! error rolling back   stack: 'Error: ETXTBSY, unlink \'/home/me/www/public_html/test/try/node_modules/grunt/node_modules/lodash/lodash.js\'',
npm ERR! error rolling back   errno: -26,
npm ERR! error rolling back   code: 'ETXTBSY'

Trying to install gulp led to a similar error.

All that I try on a virtual machine with Ubuntu 12, my host-system is Windows 8.


回答1:


I was having the same issue and I`m also new to all of this, but I found somewhere else to type the following

sudo npm install grunt -g

This worked for me and hope it helps you

Another thing that might help would be to avoid symlink creations, so you would type

sudo npm install grunt -g --no-bin-link



回答2:


I found effective running the VM with admin rights, after reading and following this answer.



来源:https://stackoverflow.com/questions/23520694/error-etxtbsy-when-installing-the-package-with-npm-gruntjs-gulp-at-virtual

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!