无法安装contextify

时间:2015-12-24 09:46:10

标签: node.js npm node-gyp npm-install contextify

我正试图在全球范围内安装环境。

npm install -g contextify

系统详细信息:

  • 节点版本 - 5.2.0
  • NPM版本 - 3.5.2
  • 系统 - CentOS版本6.7(最终版)

尝试安装contextify时遇到错误:

make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
make: Leaving directory `/d0/home/dosi/.nvm/versions/node/v5.2.0/lib/node_modules/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/d0/home/dosi/.nvm/versions/node/v5.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:88:13)
gyp ERR! stack     at ChildProcess.emit (events.js:173:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
gyp ERR! System Linux 2.6.32-573.7.1.el6.x86_64
gyp ERR! command "/d0/home/dosi/.nvm/versions/node/v5.2.0/bin/node" "/d0/home/dosi/.nvm/versions/node/v5.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /d0/home/dosi/.nvm/versions/node/v5.2.0/lib/node_modules/contextify
gyp ERR! node -v v5.2.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm ERR! Linux 2.6.32-573.7.1.el6.x86_64
npm ERR! argv "/d0/home/dosi/.nvm/versions/node/v5.2.0/bin/node" "/home/dosi/.nvm/versions/node/v5.2.0/bin/npm" "install" "-g" "contextify"
npm ERR! node v5.2.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /d0/home/dosi/platform/npm-debug.log

我也试过sudo npm install -g contextify

gyp ERR! configure error
gyp ERR! stack Error: EACCES, mkdir '/d0/home/dosi/.nvm/versions/node/v5.2.0/lib/node_modules/contextify/build'
gyp ERR! System Linux 2.6.32-573.7.1.el6.x86_64
gyp ERR! command "node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /d0/home/dosi/.nvm/versions/node/v5.2.0/lib/node_modules/contextify
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! Linux 2.6.32-573.7.1.el6.x86_64
npm ERR! argv "/d0/home/dosi/.nvm/versions/node/v5.2.0/bin/node" "/home/dosi/.nvm/versions/node/v5.2.0/bin/npm" "install" "-g" "contextify"
npm ERR! node v5.2.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

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

2 个答案:

答案 0 :(得分:0)

https://github.com/brianmcd/contextify

  

你不需要这个模块上的节点> = 0.12

     

从Node 0.12开始,Contextify已合并到Node中(感谢   @domenic),替换原生的vm模块。代码已得到改进   从那以后,所以如果可能的话,你应该使用更新的Node和   本机vm模块。请注意,不再使用较新版本的JSDOM   取决于Contextify。

答案 1 :(得分:-3)

sudo npm install -g node-inspector --unsafe-perm

解决了这个问题。