安装Ember-CLI:如何对只读文件系统(ubuntu)进行写访问?

时间:2017-02-04 13:29:20

标签: ruby-on-rails node.js ember.js vagrant ember-cli

我正在尝试在我的流浪盒中安装ember-cli:

ubuntu@ubuntu-xenial:/vagrant$ sudo npm install -g ember-cli

在检查文件权限之前,所有内容都很好看:

WARN engine ember-cli@2.11.0: wanted: {"node":"0.12.* || ^4.5 || 6.* || 7.*"
(current: {"node":"4.2.6","npm":"3.5.2"})
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN checkPermissions Missing write access to /usr/local/lib

然后,显示一堆错误行:

npm ERR! Linux 4.4.0-47-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ember-cli"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Linux 4.4.0-47-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ember-cli"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! path npm-debug.log.2125708066
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename

npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.2125708066' -> 'npm-debug.log'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /vagrant/npm-debug.log

我试着寻找修复但仍然没有运气。我打算一起使用带有Rails的ember-cli并在这里使用Vagrantfile:https://gorails.com/guides/using-vagrant-for-rails-development

您对如何解决这个问题有什么建议吗?我真的觉得我在这里错过了什么。

更新

我尝试过对该文件夹的写入权限,但仍然是这样:

ubuntu@ubuntu-xenial:/vagrant$ sudo chmod -R 777 '/usr/local/lib'
chmod: changing permissions of '/usr/local/lib': Read-only file system
chmod: changing permissions of '/usr/local/lib/python3.5': Read-only file system
chmod: changing permissions of '/usr/local/lib/python3.5/dist-packages': Read-only file system
chmod: changing permissions of '/usr/local/lib/python2.7': Read-only file system
chmod: changing permissions of '/usr/local/lib/python2.7/site-packages': Read-only file system
chmod: changing permissions of '/usr/local/lib/python2.7/dist-packages': Read-only file system

0 个答案:

没有答案