npm安装导致npm ERR等错误! tar.unpack解压Debian上的错误 [英] npm install causes errors like npm ERR! tar.unpack untar error on Debian

查看:1674
本文介绍了npm安装导致npm ERR等错误! tar.unpack解压Debian上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装Grunt如显示的 Bootstrap文档中,我首先安装了 grunt-cli 全局 npm install -g grunt-cli 现在我试着执行 npm安装,但只会出错:

  root @ devvm:/ 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可选dep失败,继续form-data@0.1.4
npm ERR! tar.unpack untar error /root/.npm/is-property/1.0.2/package.tgz
npm WARN可选dep失败,继续request@2.54.0
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argvnode/ usr / local / bin / npminstall
npm ERR!节点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!代码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!代码:'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!请尝试以root / Administrator身份再次运行此命令。
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argvnode/ usr / local / bin / npminstall
npm ERR!节点v0.10.35
npm ERR! npm v2.7.4
npm ERR!路径npm-debug.log.ba707f2a7a688e388708bbe88e2dd4ed
npm ERR!代码ETXTBSY
npm ERR! errno 62

npm ERR! ETXTBSY,重命名'npm-debug.log.ba707f2a7a688e388708bbe88e2dd4ed'
npm ERR!
npm ERR!如果您需要帮助,您可以在以下位置报告此错误:
npm ERR! < HTTPS://github.com/npm/npm/issues>

npm ERR!请包含以下任何支持请求的文件:
npm ERR! /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log

I刚刚将项目复制到非共享文件夹中,并再次启动 npm install 。它的工作。所以,这似乎是一个共享文件夹问题。但究竟是什么? 符号链接已启用此共享文件夹和我以管理员身份启动了虚拟机(这有助于解决安装Bower的类似问题)。



是什么导致这些错误以及如何解决这个问题?


环境:带有Debian访客系统和Windows 7主机系统的VirtualBox。

编辑

现在(我认为在成功执行 npm install 在一个非共享文件夹中)我发现了不同的错误:



当我用普通的方式启动虚拟机时:

  root @ devvm:/ 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可选dep失败,继续form-data@0.1.4
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! argvnode/ usr / local / bin / npminstall
npm ERR!节点v0.10.35
npm ERR! npm v2.7.4
npm ERR!路径../semver/bin/semver
npm ERR!代码UNKNOWN
npm ERR! errno -1

npm ERR! UNKNOWN,符号链接'../semver/bin/semver'
npm ERR!
npm ERR!如果您需要帮助,您可以在以下位置报告此错误:
npm ERR! < HTTPS://github.com/npm/npm/issues>
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argvnode/ usr / local / bin / npminstall
npm ERR!节点v0.10.35
npm ERR! npm v2.7.4
npm ERR!路径npm-debug.log.428531818e2d916d5ae79bdf94dd73b3
npm ERR!代码ETXTBSY
npm ERR! errno 62

npm ERR! ETXTBSY,重命名'npm-debug.log.428531818e2d916d5ae79bdf94dd73b3'
npm ERR!
npm ERR!如果您需要帮助,您可以在以下位置报告此错误:
npm ERR! < HTTPS://github.com/npm/npm/issues>

npm ERR!请包含以下任何支持请求的文件:
npm ERR! /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log

当我以 Administrator 的形式启动虚拟机:

  root @ devvm:/ 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可选dep失败,继续form-data@0.4.4
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argvnode/ usr / local / bin / npminstall
npm ERR!节点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!代码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!如果您需要帮助,您可以在以下位置报告此错误:
npm ERR! < HTTPS://github.com/npm/npm/issues>
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argvnode/ usr / local / bin / npminstall
npm ERR!节点v0.10.35
npm ERR! npm v2.7.4
npm ERR!路径npm-debug.log.0bb66467f3aae813a34e03a797f8da19
npm ERR!代码ETXTBSY
npm ERR! errno 62

npm ERR! ETXTBSY,重命名'npm-debug.log.0bb66467f3aae813a34e03a797f8da19'
npm ERR!
npm ERR!如果您需要帮助,您可以在以下位置报告此错误:
npm ERR! < HTTPS://github.com/npm/npm/issues>

npm ERR!请包含以下任何支持请求的文件:
npm ERR! /var/www/axit/portfolio/public/bower_components/bootstrap/npm-debug.log


解决方案

好的我看到了解决方案

  sudo npm cache clean 


$ p
$ b $ $ p $ sudo npm install - g grunt grunt-cli

我在MacOS上完成了此操作


Installing Grunt as in the Bootstrap documentation shown, I first installed grunt-cli globally with npm install -g grunt-cli and now I'm trying to execute npm install, but only getting errors:

root@devvm:/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 form-data@0.1.4
npm ERR! tar.unpack untar error /root/.npm/is-property/1.0.2/package.tgz
npm WARN optional dep failed, continuing request@2.54.0
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

I've just copied the project in a non-shared folder and started npm install again. And it worked. So, it seems to be a shared folder issue. But what exactly? Symlinks are enabled for this shared folder and I started the VM as admin (it helped, when I had similar issues installing Bower).

What is causing these errors and how to solve this problem?

Environment: VirtualBox with Debian guest system and Windows 7 host system.

EDIT

Now (I think after I've successfully executed npm install in a non-shared folder) I'm geting different errors:

When I start the VM in the common way:

root@devvm:/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 form-data@0.1.4
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

When I start the VM as Administrator:

root@devvm:/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 form-data@0.1.4
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

解决方案

Ok I see the solution

 sudo npm cache clean

Then

sudo npm install -g grunt grunt-cli

I did this on MacOS

这篇关于npm安装导致npm ERR等错误! tar.unpack解压Debian上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆