php - 家园:错误! tar解压解压错误

标签 php laravel ubuntu vagrant homestead

当我从项目文件夹执行命令 sudo npm install 时,出现以下错误:

 npm WARN package.json @ No repository field.
 npm WARN package.json @ No license field.
 npm WARN optional dep failed, continuing fsevents@1.0.2
 npm WARN peerDependencies The peer dependency vueify-insert-css@^1.0.0  included from vueify will no
 npm WARN peerDependencies longer be automatically installed to fulfill the  peerDependency
 npm WARN peerDependencies in npm 3+. Your application will need to depend  on it explicitly.
 npm WARN peerDependencies The peer dependency babel-runtime@^5.8.25  included from vueify will no
 npm WARN peerDependencies longer be automatically installed to fulfill the  peerDependency
 npm WARN peerDependencies in npm 3+. Your application will need to depend  on it explicitly.
 npm WARN peerDependencies The peer dependency vue-hot-reload-api@^1.2.0  included from vueify will no
 npm WARN peerDependencies longer be automatically installed to fulfill the  peerDependency
 npm WARN peerDependencies in npm 3+. Your application will need to depend   on it explicitly.
 npm WARN optional dep failed, continuing fsevents@1.0.2
 npm ERR! tar.unpack untar error /home/vagrant/.npm/spdx-expression- parse/1.0.0/package.tgz

 > expect@1.12.2 postinstall /home/vagrant/Code/laravel-  spark/node_modules/laravel-elixir/node_modules/gulp-phpspec/node_modules/expect
 > node ./npm-scripts/postinstall.js

npm WARN optional dep failed, continuing fsevents@1.0.2
npm ERR! tar.unpack untar error /home/vagrant/.npm/hosted-git-info/2.1.4/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/validate-npm-package-license/3.0.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/normalize-package-data/2.3.4/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/hosted-git-info/2.1.4/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/hosted-git-info/2.1.4/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/normalize-package- data/2.3.4/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/hosted-git- info/2.1.4/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/normalize-package- data/2.3.4/package.tgz
npm WARN optional dep failed, continuing fsevents@1.0.2
npm ERR! tar.unpack untar error  /home/vagrant/.npm/request/2.11.4/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/redeyed/0.5.0/package.tgz
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
npm WARN optional dep failed, continuing bufferutil@1.2.1
npm WARN optional dep failed, continuing utf-8-validate@1.2.1

    > bufferutil@1.2.1 install /home/vagrant/Code/laravel-  spark/node_modules/laravel-elixir/node_modules/browser-    sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/        bufferutil
    > node-gyp rebuild

    make: Entering directory `/home/vagrant/Code/laravel-  spark/node_modules/laravel-elixir/node_modules/browser-      sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/       bufferutil/build'
   make: Warning: File `bufferutil.target.mk' has modification time 1.8 s  in    the future
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  In file included from ../src/bufferutil.cc:8:0:
  /home/vagrant/.node-gyp/4.1.1/include/node/node.h:428:3: fatal error:      opening dependency file     ./Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw: Operation    not permitted
  }
  ^
  /home/vagrant/.node-gyp/4.1.1/include/node/node.h:450:3: note: in expansion of  macro ‘NODE_MODULE_X’
  NODE_MODULE_X(modname, regfunc, NULL, 0)
  ^
 ../src/bufferutil.cc:120:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(bufferutil, init)
 ^
 compilation terminated.
 make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
 make: Leaving directory `/home/vagrant/Code/laravel-  spark/node_modules/laravel-elixir/node_modules/browser-  sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/ bufferutil/build'
 gyp ERR! build error
 Error: `make` failed with exit code: 2
 gyp ERR! stack     at ChildProcess.onExit   (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
 gyp ERR! stack     at emitTwo (events.js:87:13)
 gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
 gyp ERR! stack     at Process.ChildProcess._handle.onexit   (internal/child_process.js:200:12)
 gyp ERR! System Linux 3.19.0-25-generic
 gyp ERR! command "/usr/bin/nodejs"  "/usr/lib/node_modules/npm/node_modules/node-   gyp/bin/node-gyp.js" "rebuild"
 gyp ERR! cwd /home/vagrant/Code/laravel-spark/node_modules/laravel-  elixir/node_modules/browser- sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/ bufferutil
 gyp ERR! node -v v4.1.1
 gyp ERR! node-gyp -v v3.0.3
 gyp ERR! not ok
 npm WARN optional dep failed, continuing bufferutil@1.2.1
 npm ERR! tar.unpack untar error /home/vagrant/.npm/is-fullwidth-code- point/1.0.0/package.tgz
 npm ERR! tar.unpack untar error  /home/vagrant/.npm/lodash._createpadding/3.6.1/package.tgz
 npm ERR! tar.unpack untar error  /home/vagrant/.npm/minimatch/1.0.0/package.tgz
 npm WARN optional dep failed, continuing source-map@0.2.0
 npm WARN optional dep failed, continuing request@2.65.0
 npm ERR! Linux 3.19.0-25-generic
 npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
 npm ERR! node v4.1.1
 npm ERR! npm  v2.14.4
 npm ERR! path /home/vagrant/Code/laravel- spark/node_modules/gulp/node_modules/gulp- util/node_modules/dateformat/node_modules/meow/node_modules/redent/node_modules/ indent-string/node_modules/repeating/node_modules/is- finite/package.json.1e4bb64b90431a2b7469fc227112bf51
 npm ERR! code EPERM
 npm ERR! errno -1
 npm ERR! syscall open

 npm ERR! Error: EPERM: operation not permitted, open  '/home/vagrant/Code/laravel-spark/node_modules/gulp/node_modules/gulp-  util/node_modules/dateformat/node_modules/meow/node_modules/redent/node_modules/     indent-string/node_modules/repeating/node_modules/is-  finite/package.json.1e4bb64b90431a2b7469fc227112bf51'
 npm ERR!     at Error (native)
 npm ERR!  { [Error: EPERM: operation not permitted, open  '/home/vagrant/Code/laravel-spark/node_modules/gulp/node_modules/gulp- util/node_modules/dateformat/node_modules/meow/node_modules/redent/node_modules/ indent-string/node_modules/repeating/node_modules/is-  finite/package.json.1e4bb64b90431a2b7469fc227112bf51']
 npm ERR!   errno: -1,
 npm ERR!   code: 'EPERM',
 npm ERR!   syscall: 'open',
 npm ERR!   path: '/home/vagrant/Code/laravel-  spark/node_modules/gulp/node_modules/gulp-  util/node_modules/dateformat/node_modules/meow/node_modules/redent/node_modules/     indent-string/node_modules/repeating/node_modules/is-   finite/package.json.1e4bb64b90431a2b7469fc227112bf51' }
 npm ERR!
 npm ERR! Please try running this command again as root/Administrator.

 npm ERR! Linux 3.19.0-25-generic
 npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
 npm ERR! node v4.1.1
 npm ERR! npm  v2.14.4
 npm ERR! path npm-debug.log.a08378d997b4655c60a2069f82821277
 npm ERR! code ETXTBSY
 npm ERR! errno -26
 npm ERR! syscall rename

 npm ERR! ETXTBSY: text file is busy, rename 'npm- debug.log.a08378d997b4655c60a2069f82821277' -> '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!     /home/vagrant/Code/laravel-spark/npm-debug.log

我也试过使用命令 sudo npm cache clean 但没有效果。但是当我在主文件夹中执行命令 sudo npm install 时,它工作正常。这会导致权限问题吗?

感谢帮助

最佳答案

我将节点更新到版本 3.4,似乎解决了这个问题。

关于php - 家园:错误! tar解压解压错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33343731/

相关文章:

php - 如何在路由 INI 文件中为 Zend Framework 中的子域编写路由链?

php - 在php中处理来自excel的大数据

mysql - Eloquent - 按 "from date"到 "to date"分组,间隔一天

php - 如何统计mysql中DATE类型一年重复的次数?

python - 使用 echo 写入文件的换行符在 shell 中有效,但在 Python 3 中为文字

php - 如何使用 eval 从函数返回?

php - 我的 cart.php 页面出现错误

Php - 如何从 mysql 中排除数据

ubuntu - Gvim 中的文本消失

bash - 为 Mercurial (hg) 启用 bash 选项卡补全