I want to install zeromq for node.js in Windows 7 64-bit. I tried with
npm install zmq
phython.exe is missing. After installing that
Again it gave some build error, which is as follows:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
Improvements were made, now
npm install zmq works, but you still need Win SDK 7 and VS C++ 2010, I think.
npm install zmq still don't work, but you can install it from local repo.
mscdex forked the zeromq.node repo, and added windows support, so just clone his zeromq.node
But before build you need some prerequisites:
Run the Windows SDK 7.1 Command Prompt from Start menu / Microsoft Windows SDK v7.1
go to the cloned directory, and type
this should work on windows 7 64bit. I cloned zeromq.node into my node project dir, so in my
app.js i could
The latest update:
Windows 8.1, node v4.4.5, npm v3.10.5
- Ensure python2 environment as usual
- Install Windows SDK (mine 8.1)
- Install VS2015 Community and select Common Tools for Visual C++
npm -g install npm@next see this
npm install --msvs_version=2015 zmq
Note: I can't build with vs2012 anymore and all the suggested above not working with build error
error c2240 cannot convert from 'v8::Value *' to 'v8:object *volatile'. Maybe because of the newer nodejs v4.4.5 (someone can clarify this?).
However using vs2015 produce build error
win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2'. I fix this using
npm@next as mentioned above.
I had alot of trouble myself and eventually got it installed after hours of reading and trying diff things out:
Install python. Make sure Python 2.7.x installed and not 3.x (i used https://www.python.org but cygwin's python might work too)
Confirm by running below:
$ python -V
set PYTHON env variable, whereever you installed it (or cygwin's bin directory if installing python that way):
Set what folder python.exe added onto your PATH variable:
needed this node-gyp installed manually:
$ npm install -g node-gyp
... Got slightly further...
So I quit with trying to get it to install with my current Visual C++ 2010 and got Visual C++ 2012 to work (think 2013 may work too):
so installed 'Visual Studio 2012 Express for Windows Desktop'
Should install the '2012 Visual C++ Redistributables' (if not, install separately).
Also had 'Windows7 SDK' already installed per balazs instructions so probably need that too.
Now try on Windows command line and specify the version to use:
$ npm install --msvs_version=2012 zmq
and it worked!
Note: wanted to mention what I already had installed. Already had 'Visual Studio C++ 2010 Express' installed (which installed Visual C++ 2010 Redistributables)
and Windows7 SDK since I was kinda following balazs instructions above.
Then I tried installing:
'Microsoft Visual Studio 2010 Service Pack 1'
'Visual C++ SP1 Compiler Update for Windows SDK 7.1'
Since none of that 2010 worked, I went with 2012.
Maybe someone can figure out if possible to make it work with C++ 2010.
I did not look into recent changes in that package but I wrote https://github.com/matthiasg/zeromq-node-windows for our own projects which added minor changes to the zeromq-node project to make it work in Windows... as it says in the readme I don't offer support , but maybe that will get you started ?
This thread was very useful, here's what worked for me today on Win10:
- Download / install zmq binaries for windows
- Download / install node.js for windows
- Get miniconda2 or similar in case you have python3 (python 2 required for the steps below build)
- Get VS 2013 (any version should do) VS '15 doesn't work at this time
- From a python2 prompt:
npm install --msvs_version=2013 zmq
This recipe can be found in it's original form on Stack Over Flow.