安裝咕嚕tar.unpack解壓錯誤作爲Bootstrap documentation所示,我先用npm install -g grunt-cli
安裝grunt-cli
全球,現在我試圖執行npm install
,但只收到錯誤:npm安裝導致npm ERR等錯誤!在Debian
[email protected]:/var/www/axit/portfolio/public/bower_components/bootstrap# npm install
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz
npm ERR! tar.unpack untar error /root/.npm/brace-expansion/1.1.0/package.tgz
npm ERR! tar.unpack untar error /root/.npm/delayed-stream/0.0.5/package.tgz
npm WARN optional dep failed, continuing [email protected]
npm ERR! tar.unpack untar error /root/.npm/is-property/1.0.2/package.tgz
npm WARN optional dep failed, continuing [email protected]
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.35
npm ERR! npm v2.7.4
npm ERR! path /var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! Error: EPERM, open '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js'
npm ERR! { [Error: EPERM, open '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-saucelabs/node_modules/sauce-tunnel/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.35
npm ERR! npm v2.7.4
npm ERR! path npm-debug.log.ba707f2a7a688e388708bbe88e2dd4ed
npm ERR! code ETXTBSY
npm ERR! errno 62
npm ERR! ETXTBSY, rename 'npm-debug.log.ba707f2a7a688e388708bbe88e2dd4ed'
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! /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log
我剛將該項目複製到非共享文件夾中,然後再次啓動npm install
。它的工作。所以,這似乎是一個共享文件夾問題。但究竟是什麼? Symlinks are enabled爲這個共享文件夾,我作爲管理員啓動虛擬機(它幫助,當我有類似的問題安裝Bower)。
什麼是造成這些錯誤以及如何解決這個問題?
環境:使用Debian來賓系統和Windows 7主機系統的VirtualBox。
編輯
現在(我想以後我已經成功地執行npm install
在非共享文件夾)我在歌廳不同的錯誤:
當我啓動虛擬機中常見的方法:
[email protected]:/var/www/axit/portfolio/public/bower_components/bootstrap# npm install
npm ERR! tar.unpack untar error /root/.npm/delayed-stream/0.0.5/package.tgz
npm WARN optional dep failed, continuing [email protected]
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz
npm ERR! tar.unpack untar error /root/.npm/brace-expansion/1.1.0/package.tgz
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.35
npm ERR! npm v2.7.4
npm ERR! path ../semver/bin/semver
npm ERR! code UNKNOWN
npm ERR! errno -1
npm ERR! UNKNOWN, symlink '../semver/bin/semver'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.35
npm ERR! npm v2.7.4
npm ERR! path npm-debug.log.428531818e2d916d5ae79bdf94dd73b3
npm ERR! code ETXTBSY
npm ERR! errno 62
npm ERR! ETXTBSY, rename 'npm-debug.log.428531818e2d916d5ae79bdf94dd73b3'
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! /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log
當我啓動VM作爲Administrator
:
[email protected]:/var/www/axit/portfolio/public/bower_components/bootstrap# npm install
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz
npm ERR! tar.unpack untar error /root/.npm/wrappy/1.0.1/package.tgz
npm ERR! tar.unpack untar error /root/.npm/delayed-stream/0.0.5/package.tgz
npm ERR! tar.unpack untar error /root/.npm/brace-expansion/1.1.0/package.tgz
npm WARN optional dep failed, continuing [email protected]
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.35
npm ERR! npm v2.7.4
npm ERR! path /var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy
npm ERR! code UNKNOWN
npm ERR! errno -1
npm ERR! UNKNOWN, mkdir '/var/www/axit/portfolio/public/bower_components/bootstrap/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.35
npm ERR! npm v2.7.4
npm ERR! path npm-debug.log.0bb66467f3aae813a34e03a797f8da19
npm ERR! code ETXTBSY
npm ERR! errno 62
npm ERR! ETXTBSY, rename 'npm-debug.log.0bb66467f3aae813a34e03a797f8da19'
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! /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log
我沒有嘗試複製您的問題,但首先我想問你一個問題:你是否試圖使用'sudo'運行命令?因爲這行'npm ERR!請嘗試以root/Administrator身份再次運行此命令。似乎表明這一點。像'sudo npm install'可能就是解決方案。 – 2015-04-01 08:22:43
我是Debian訪客系統上的'root'。我還在主機上以'Administrator'身份啓動了虛擬機。 – automatix 2015-04-01 08:26:51
不確定,但在[這個答案](http://stackoverflow.com/a/23526288/4594377)和下面的評論中,他們建議使用一個額外的選項'--no-bin-link'。你說安裝Bower時遇到了問題,也許只是啓用符號鏈接是不夠的。 – 2015-04-01 08:43:24