当前位置: 首页 > 知识库问答 >
问题:

在Ubuntu Vagrant上运行npm install grunt时出现tar.unpack untar错误

应安国
2023-03-14
$ npm install grunt
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! tar.unpack untar error /home/vagrant/.npm/abbrev/1.0.9/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/dateformat/1.0.2-1.2.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/colors/0.6.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/inherits/1.0.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/nopt/1.0.10/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/inherits/2.0.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/lru-cache/2.7.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/async/0.1.22/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.4.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/getobject/0.1.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/exit/0.1.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/2.4.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/eventemitter2/0.4.14/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.3.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt-legacy-log-utils/0.1.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/graceful-fs/1.2.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/hooker/0.2.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt-legacy-log/0.1.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/iconv-lite/0.2.11/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/2.4.2/package.tgz
npm WARN install:lodash@2.4.2 EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/lodash-e740bce0/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.3.3/package.tgz
npm WARN install:underscore.string@2.3.3 EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/underscore.string-478f4497/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/2.4.2/package.tgz
npm WARN install:lodash@2.4.2 EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/lodash-066a8478/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/0.9.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/rimraf/2.2.8/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/sigmund/1.0.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/minimatch/0.2.14/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/glob/3.1.21/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/minimatch/0.3.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/glob/3.2.11/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/findup-sync/0.1.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore/1.7.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/which/1.0.9/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/argparse/0.1.16/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.2.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt-legacy-util/0.2.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt/0.4.5/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/esprima/1.0.4/package.tgz
npm WARN install:esprima@1.0.4 EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/esprima-8320b64c/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/coffee-script/1.3.3/package.tgz
npm WARN install:coffee-script@1.3.3 EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/coffee-script-fbff1893/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/js-yaml/2.0.5/package.tgz
npm WARN install:js-yaml@2.0.5 EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/js-yaml-0f65429b/package.json'
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "grunt"
npm ERR! node v5.11.1
npm ERR! npm  v3.8.6
npm ERR! path /home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall utime

npm ERR! Error: EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json']
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'utime',
npm ERR!   path: '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json',
npm ERR!   fstream_finish_call: 'utimes',
npm ERR!   fstream_type: 'File',
npm ERR!   fstream_path: '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json',
npm ERR!   fstream_class: 'FileWriter',
npm ERR!   fstream_stack:
npm ERR!    [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:306:21',
npm ERR!      'FSReqWrap.oncomplete (fs.js:82:15)' ],
npm ERR!   parent: 'BulbThings' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/Code/bulbthings/Frontend/Angular3/npm-debug.log

共有1个答案

林波鸿
2023-03-14

找到了一种解决这个问题的方法,使用vagrant中的默认文件驱动程序来同步文件夹,而不是NFS,尽管这在OSX上确实会慢得多。

改变了

synced_folder:
            vflsf_2ll1rv82p2ge:
                source: ~/Code
                target: /home/vagrant/Code
                sync_type: nfs

synced_folder:
            vflsf_2ll1rv82p2ge:
                source: ~/Code
                target: /home/vagrant/Code
                sync_type: default
 类似资料:
  • 我试图使用Eclipse IDE在Apache Tomcat上执行一个简单的servlet。servlet本身正在执行,但当我试图调用html表单时,我将通过该表单向servlet传递用户数据,我得到错误404。我的做法是不正确的吗? 更新1:文件web.xml

  • 我一直在遵循学说入门文档,并立即遇到了学说的CLI问题。 如果我试图逃跑 或者 或者甚至 PHP /vendor/bin/doctrine 我在我的终端中得到这个错误。。。 PHP致命错误:未捕获错误:在/Users/admin/.bitnami/stackman/machines/xampp/volumes/root/htdocs/doctrine2 tutorial/vendor/Doctri

  • 我只是从AWS开始。。。 我有一个EC2实例,它正在运行WordPress(WordPress由市场上的Bitnami图像提供支持-https://aws.amazon.com/marketplace/pp/B007IP8BKQ)。一切正常,我可以从标准HTTP访问WP安装的前端和后端。 当我将实例连接到ELB并尝试通过HTTPS访问站点时,问题就出现了。 我已经完成了使用ACM设置SSL证书的过

  • 我在Windows7中有cygwin,下载并安装了maven“二进制文件”,并有以下设置 我错过了什么?

  • 我在上面有一个问题:我使用了提供的答案,但仍然击中了一个对象错误。你能看到我错过了什么吗?我在“cash_sheet.range(”C8“).pastespecial xlpastevalues”处找到了错误

  • 在我的环境中设置了JAVA_HOME之后,我在运行pig时得到了以下结果: 当我这么做的时候: 但是在我的环境中,JAVA_HOME是这样设置的: 运行于:Ubuntu 10.04.4 LTS java:java版本“1.6.0_21”Hadoop版本:Hadoop-0.20.203 PIG版本:PIG-0.11.1 env:term=Xterm shell=/bin/bash xdg_sessi

  • 代码: pom.xml依赖项: 我不明白发生了什么事,有人能帮忙吗?

  • 问题内容: 我尝试了以下文档以在Google云上运行node.js应用程序:https : //cloud.google.com/nodejs/getting-started/hello- world Node.js运行正常,但是如果我运行,我会…。 问题答案: 最新的Google Cloud SDK 0.9.65版本存在一个错误。 您可以使用以下命令还原到Cloud SDK 0.9.64: 下一