【问题标题】:Unable to install node ZeroMQ through npm in windows无法在 Windows 中通过 npm 安装节点 ZeroMQ
【发布时间】:2015-11-24 09:34:07
【问题描述】:

我们正在尝试通过 npm 在 windows8 64 位上安装 zeromq *我们安装visual studio 2010和python 但我们仍然收到如下错误:

D:\Projects\changi\node_modules\zmq>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-g
yp.js" rebuild )  else (rebuild)
gyp ERR! configure error
gyp ERR! stack Error: spawn C:\Python27 ENOENT
gyp ERR! stack     at exports._errnoException (util.js:849:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
gyp ERR! stack     at onErrorNT (internal/child_process.js:344:16)
gyp ERR! stack     at doNTCallback2 (node.js:430:9)
gyp ERR! stack     at process._tickCallback (node.js:344:17)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\changi\node_modules\zmq
gyp ERR! node -v v4.1.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "zmq"
npm ERR! node v4.1.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! zmq@2.14.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.14.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq 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 their info via:
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Projects\changi\npm-debug.log

您能否告诉我们我们缺少什么或指出一些文件可以帮助我们做到这一点,感谢您抽出宝贵的时间

【问题讨论】:

标签: node.js npm queue zeromq


【解决方案1】:

设置 PYTHON 环境变量。

【讨论】:

  • 设置 python 环境变量后,我在编辑的帖子中收到错误,请检查
  • 在此处查看安装指南:github.com/nodejs/node-gyp 并检查您是否已准备好所有东西
【解决方案2】:
* Install python. Make sure Python 2.7.x with the steps provided below
    http://www.howtogeek.com/197947/how-to-install-python-on-windows/
    And confirm by running below commands: 
    $ python -V
    Python 2.7.9
*installed node-gyp manually:
        $ npm install -g node-gyp
*installed 'Visual Studio 2012 Express for Windows Desktop'
*install 'Windows7 SDK' 
  *And do  npm install zmq
and it worked!

【讨论】:

    猜你喜欢
    • 2023-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-02
    • 1970-01-01
    • 2016-06-14
    • 2017-12-10
    相关资源
    最近更新 更多