Update 10/05/2011: If you are installing on Windows 7 64 bit, please read this comment. Thanks idealogue!
Update 09/20/2011: I was able to successfully install the latest NodeJS stable version (v0.4.12) so, I am updating these instructions to reflect that.
If you are planning on upgrading NodeJS from an older version to a newer one, just follow from Step 7.
I just had NodeJS successfully installed on Windows XP using Cygwin and thought this might be of use to someone who wants to do the same.
Pre-requisites: Cygwin with Python & some additional packages (we’ll go over that in a bit)
- Double click Cygwin’s setup.exe and continue till you get to select packages window
- Select Python
- Select Make
- Select G++
- Select wget(not really required but, good to have for downloading archives & stuffs
) - Click next and complete the installation
-
From cygwin type the following commands. Note: At the time of this writing v0.2.0 is the current NodeJS version.
wget http://nodejs.org/dist/node-v0.4.12.tar.gz tar xvf node-v0.4.12.tar.gz cd node-v0.4.12/ ./configure make make install
-
If all goes well, then you should see NodeJS’s version when you type the following command.
node --version v0.4.12
Update:
For Windows 7 & Windows Vista users, please run rebaseall with -v option as suggested in this comment.
http://boxysystems.com/index.php/step-by-step-instructions-to-install-nodejs-on-windows/comment-page-1/#comment-617
Thanks Vladimir for your suggestion ![]()
Now its time to crack some code to your heart’s desire




You so totally rock! I have been struggling with this for months. Thanks a million!
Excellent, thank you!
And for those that run into the same problem as me when running ./configure (unable to remap C:\cygwin\bin\cygiconv-2.dll to same address as parent) do the following:
Make sure you have cygwin/bin in your path and then follow instructions here:
http://www.cygwin.com/ml/cygwin/2003-06/msg01241.html
Hi ,
I am getting this error :
$ ./configure
Checking for program g++ or c++ : /usr/bin/g++
0 [main] python 4132 C:\cygwin\bin\python.exe: *** fatal error – unable to
remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as paren
t: 0×320000 != 0×360000
Stack trace:
Frame Function Args
002891E8 610274AB (002891E8, 00000000, 00000000, 00000000)
002894D8 610274AB (61177840, 00008000, 00000000, 61178977)
0028A508 61004ADB (611A034C, 6123F824, 00320000, 00360000)
End of stack trace
0 [main] python 3616 fork: child 4132 – died waiting for dll loading, errn
o 11
/cygdrive/d/node/node-v0.2.0/wscript:137: error: could not configure a cxx compi
ler!
How I can fix it ?
My guess is, may be the G++ didn’t install properly.
Try re-installing G++ package again or installing C++ package.
Hope that helps.
Hi,
I installed node successfully after running \rebaseall\ command.
To do this go to your cygwin/bin directory from the cmd and then run ash.exe,Now just run \rebaseall\,but before that close all cygwin instances.
One should specify, when having the could not configure a cxx compiler! error that you need to execute rebaseall from the bin directory using \bin\rebaseall and not just \rebaseall\ . Else the ash program won’t find the script.
Thanks,
I would also reccomend selecting to install git as well as cURL
Thank you for your post it was very helpful!
But I suggest to make some improvements to the post.
I had the same problem that was mention in previous comments with both Windows Vista and Windows 7.
I believe it’s necessary to update the post to address issue with more modern Window systems. I mean for Windows Vista and Windows 7 we have to run “rebaseall” command. And my advice to use option “-v” in case of error to see what is going on. In my case recommendation from the following link resolved the problem.
http://code.google.com/p/cyg-apt/issues/detail?id=8
——————————————-
I have not tried this package but I was experiencing the same issue with rebaseall. I was able to fix it by opening CYGINSTALLDIR/bin/rebaseall in a text editor and changing line 83 to from:
TmpDir=”${TMP:-${TEMP:-/tmp}}”
to
# TmpDir=”${TMP:-${TEMP:-/tmp}}”
TmpDir=”/tmp”
—————————————
I have updated the post. Thanks Vladimir for your suggestion
It’s me again. For some reason I was trying again to install cygwin on my Windows Vista computer and suddenly this time rebaseall command failed to execute normally. The previous trick didn’t work at this time. I was lucky to find the following post that resolved my problem:
http://blog.brev.name/2010/09/nodejs-on-windows-7-under-cygwin.html?showComment=1284936993253_AIe9_BEuSc8B_nu9KzMfcAkQW3YQuXtbqZj7M33avU74Waa1oMLbyOQ3wTDHHkCiW4wJ7eIAyeTqubS7EE3I9wswhzY2QBj4Pc0XhvL6e77Ag6u47oNY8EQrhpEkvij4W1r7JKmt3VchNR0KpWzD796Z3U0jqBP1mClwww_V7F2tiie5Jd5xOLr0gLw6Ur5UpnRRu3Knvksb3itiR3WlF_cwsZEDmcR9GQ_etqSRvE_bKXqIwGUOngx_vVsP-RkpN-BNeIZkU3JhXOYbW_ACU4_6QiQ1Ox1jeyfCJdq6tQsP2vOfmcc27HkzPHU5rtNknX63_hUpqoi_TqVxEIQncYn5JGKzvO3pm0bLYRhtZBm1MxlpHrW82dTSwkiipR1Moy2tFBiYYXDUUBluGd-DWyWIUcMLyE1UWHmDKGirZq_oO5F0MT8eMbOaLrQWGjs5TNFKH9yMkoebCvgKTE6d0gCbV4gcO5uUukSlBS5DjsPWtBPrTmUd94Kj9wq7i0meknClWONnjWPlYKklRSFefjUBmafUy8URlkkSp0v6Fmt2zhu23Nt6Q35ZkblcxqLgmdmUq_YWgRnMdvc58HGR-e__63hxyX7GIH4j09PM0uaCJx0OeGFHET4cvP_u1eK6dwspuhNiqzN6Abltz2gNpeLrUaL30vKfhtqrb2Z1Quxrh9hedx6zQuU#c1502407389787754114
I don’t understand why Cygwin create such annoying problem for people who are using Windows Vista and Windows 7;)
Maybe someone should ask them to fix this as soon as possible otherwise the number of blogs related to this issue will be on rise
Hi I was followed this tutorial and installed the node but I don’t know how to write a program and how to compile it and where to run. Even I tried by giving this command in cygwin node node. But I doesn’t get it running instead an error
fs:150
return binding.open(path, stringtoflags …)
….
…
something like that???
How to deal with node.js installing?
Useful links:
http://codebetter.com/matthewpodwysocki/2010/09/08/getting-started-with-node-js-on-windows/
http://boxysystems.com/index.php/step-by-step-instructions-to-install-nodejs-on-windows/comment-page-1/ – maybe, there’s not all things to be downloaded in the list
http://code.google.com/p/cyg-apt/issues/detail?id=8
http://www.cygwin.com/ml/cygwin/2003-06/msg01241.html
http://blog.brev.name/2010/09/nodejs-on-windows-7-under-cygwin.html?showComment=1284936993253_AIe9_BEuSc8B_nu9KzMfcAkQW3YQuXtbqZj7M33avU74Waa1oMLbyOQ3wTDHHkCiW4wJ7eIAyeTqubS7EE3I9wswhzY2QBj4Pc0XhvL6e77Ag6u47oNY8EQrhpEkvij4W1r7JKmt3VchNR0KpWzD796Z3U0jqBP1mClwww_V7F2tiie5Jd5xOLr0gLw6Ur5UpnRRu3Knvksb3itiR3WlF_cwsZEDmcR9GQ_etqSRvE_bKXqIwGUOngx_vVsP-RkpN-BNeIZkU3JhXOYbW_ACU4_6QiQ1Ox1jeyfCJdq6tQsP2vOfmcc27HkzPHU5rtNknX63_hUpqoi_TqVxEIQncYn5JGKzvO3pm0bLYRhtZBm1MxlpHrW82dTSwkiipR1Moy2tFBiYYXDUUBluGd-DWyWIUcMLyE1UWHmDKGirZq_oO5F0MT8eMbOaLrQWGjs5TNFKH9yMkoebCvgKTE6d0gCbV4gcO5uUukSlBS5DjsPWtBPrTmUd94Kj9wq7i0meknClWONnjWPlYKklRSFefjUBmafUy8URlkkSp0v6Fmt2zhu23Nt6Q35ZkblcxqLgmdmUq_YWgRnMdvc58HGR-e__63hxyX7GIH4j09PM0uaCJx0OeGFHET4cvP_u1eK6dwspuhNiqzN6Abltz2gNpeLrUaL30vKfhtqrb2Z1Quxrh9hedx6zQuU#c1502407389787754114
Change 83th and 110th lines of rebaseall text file.
Run ash from cmd
cd E:\Cygwin\bin\ash.exe
type
/usr/bin/revaseall -v
After that, follow instructions in mentioned tutorials
the end:
cd node-v0.2.5/
./configure
make
make install
Check whether all is OK:
node –version
You need to see something like this:
v0.2.5
Hi all
I got this erro
$ ./configure
Checking for program g++ or c++ : /usr/bin/g++
0 [main] python 3824 C:\cygwin\bin\python.exe: *** fatal error – unable to
remap \\?\C:\cygwin\lib\python2.6\lib-dynload\itertools.dll to same address as
parent: 0×370000 != 0×380000
Stack trace:
Frame Function Args
002291E8 6102792B (002291E8, 00000000, 00000000, 00000000)
002294D8 6102792B (6117DC60, 00008000, 00000000, 6117F977)
0022A508 61004F3B (611A6FAC, 61248DC4, 00370000, 00380000)
End of stack trace
1 [main] python 2396 fork: child 3824 – died waiting for dll loading, errn
o 11
/home/jyobish/node/wscript:210: error: could not configure a cxx compiler!
Did you do this?
http://boxysystems.com/index.php/step-by-step-instructions-to-install-nodejs-on-windows/comment-page-1/#comment-494
when i try to run the cmd after installing git clone git://github.com/ry/node.git
i have the following error ..
fatel :remote error could not find repository ry/node
Are you inside the firewall? If yes, can you try without any firewall?
@shiva repo address is changed to git://github.com/joyent/node.git
When I enter ./configure, I get this error:
Confused@Confused-PC ~/node-v0.2.0
$ ./configure
/home/Confused/node-v0.2.0/wscript: error: Traceback (most recent call last):
File "/home/Confused/node-v0.2.0/tools/wafadmin/Utils.py", line 274, in load_mod
ule
exec(compile(code, file_path, 'exec'), module.__dict__)
File "/home/Confused/node-v0.2.0/wscript", line 12, in
import js2c
File "/home/Confused/node-v0.2.0/tools/js2c.py", line 35, in
import jsmin
ImportError: No module named jsmin
Any clue as to what I’m doing wrong? I know jsmin is there because I’m staring at it, perhaps it’s looking in the wrong directory? Do I need to edit each of the aforementioned .PY files so that they point to the correct folders?
Hi Confused,
Can you retry with the latest version?
I have updated this article for v0.4.7.
Haha, that explains a lot. Everything’s working now thanks. I feel really dumb, I don’t know why I kept typing the 0.2.0 version. I didn’t notice it when I looked over it, biggest brain fart I’ve had in a while.
I couldn’t get the ‘make’ command to complete successfully, here’s a warning message I got:
cygwin warning:
MS-DOS style path detected: C:/GNUstep/mingw/include
Preferred POSIX equivalent is: /cygdrive/c/GNUstep/mingw/include
CYGWIN environment variable option “nodosfilewarning” turns off this warning.
Consult the user’s guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
In file included from ../src/node.h:26,
from ../src/node_main.cc:22:
../deps/libeio/eio.h:286: error: `uid_t’ has not been declared
../deps/libeio/eio.h:286: error: `gid_t’ has not been declared
../deps/libeio/eio.h:292: error: `uid_t’ has not been declared
../deps/libeio/eio.h:292: error: `gid_t’ has not been declared
Waf: Leaving directory `/home/vance/node-v0.4.7/build’
Build failed: -> task failed (err #1):
{task: cxx node_main.cc -> node_main_4.o}
make: *** [program] Error 1
>CYGWIN environment variable option “nodosfilewarning” turns off this warning.
Setting up a Windows system environment named ‘CYGWIN’ with the value ‘nodosfilewarning’ gets rid of the warning above.
And instead of just running
./configure
I ran this command
./configure –dest-cpu=ia32
per the suggestion from my instructor (I’m taking an online class on node.js) and then ran the ‘make’ and ‘make install’ commands again. The modified ‘./configure’ command seems to have done the trick, as far as getting node.js to install properly.
Cool Vance! I am glad you solved it
All seemed to go well up until I ran ./configure, I got this output:
Danjah@PC ~/node-v0.4.7
$ ./configure
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : not found
Checking for function SSL_library_init : not found
Checking for header openssl/crypto.h : not found
/home/Danjah/node-v0.4.7/wscript:340: error: Could not autodetect OpenSSL support. Make sure OpenSSL development package
s are installed. Use configure –without-ssl to disable this message.
—
Should I worry about that? Disable it? How do I install the required packages and where can i get them from?
(followup) I re-used the setup.exe from Cygwin and found and installed the OpenSSL packages. Successful ‘make install’.
Ok – another stall for me, I’ve installed mingw32, I tried ./configure –without-ssl and I got an error, probably related to a path issue:
Danjah@PC /c/cygwin/home/Danjah/node-v0.4.7/node
$ ./configure –without-ssl
/usr/bin/env: python: No such file or directory
I read that I must add both the Python and GIT environment variables… I’m pretty sure I got the Python one right:
(PythonPath=C:\Python27;C:\Python27\DLLs;C:\Python27\Lib;C:\Python27\Lib\lib-tk)
…but I have no idea what I should use for mingw32′s environment variable. Bit of Googling didn’t answer my question unfortunately.
Any suggestions?
If your rebaseall fails with this error:
FixImage (/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll) faile, with last error = 13
Follow the link here for the fix:
http://cygwin.com/ml/cygwin/2011-03/msg00604.html
Hi guys,
Worked up until rebaseall for me on win7…
Had to do this to fix it:
Edit /bin/rebaseall (line 110)
-e ‘/\/sys-root\/mingw\/bin/d’
to:
sed -e ‘\=/sys-root/mingw/bin=d’ -e ‘\=cygwin1\.dll$=d’ -e ‘\=cyglsa.*\.dll$=d’ -e ‘s=^=/=’ >”$TmpFile”
Worked. Thanks!
thank u for ur posting so much ~
i got it all
Windows 7 Professional. Your instructions were perfect. Of course I had to run /bin/rebaseall from the command prompt. Thank you!
Hi guys,
I’ve tried every steps, but i’m getting this error when i try to install ‘make’
gcc: unrecognized option ‘-pthread’
test/test-fs.c: In function ‘check_utime’:
test/test-fs.c:426:3: error: ‘struct stat’ has no member named ‘st_atimespec’
test/test-fs.c:427:3: error: ‘struct stat’ has no member named ‘st_mtimespec’
make[1]: *** [test/run-tests] Error 1
make[1]: Leaving directory
Waf: Leaving directory
Build failed: -> task failed (err #2):
{task: uv uv.h -> uv.a}
make: *** [program] Error 1
any suggestion?
The explanations for using this in 64 bit Windows 7 are helpful, but incomplete. The links to brev.blog are broken too. Here’s what everyone who is ready to pull their hair out needs to know:
Two lines should be changed in rebaseall –
83 -> TmpDir=”/tmp”
110 -> sed -e ‘/cygwin1\.dll$/d’ -e ‘/cyglsa.*\.dll$/d’ -e ‘s/^/\//’ -e ‘/\/sys-root\/mingw\/bin/d’ >”$TmpFile”
The line in 110 is critical to exclude 64 bit dlls. H/T https://www.alljoyn.org/forums/developers/rebase-usage
This will let you avoid this nasty error – FixImage (/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll) failed with last error = 13
Then ash can do its thing to rebaseall, and your compilers will be found. Happy times all around.
Thanks idealogue
I have updated the post with your comment.