[英]node.js build error on cygwin
i'm using cygwin on windows 7 machine and installing node.js using these instruction: https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows) 我在Windows 7计算机上使用cygwin并使用以下指令安装node.js: https : //github.com/joyent/node/wiki/Building-node.js-on-Cygwin-( Windows )
i keep getting the below error when i try to build. 当我尝试构建时,我一直收到以下错误。 ./configure works fine but the make command is giving me trouble. ./configure可以正常工作,但是make命令给我带来麻烦。 i've looked everywhere and haven't been able to find an answer. 我到处都看了,还没找到答案。 does anyone know what's wrong? 有人知道怎么了吗?
user-THINK ~/node-v0.4.12
$ ./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 gcc : ok
Checking for library dl : yes
Checking for openssl : yes
Checking for library util : yes
Checking for library rt : yes
--- libeio ---
Checking for library pthread : yes
Checking for function pthread_create : yes
Checking for function pthread_atfork : yes
Checking for futimes(2) : yes
Checking for readahead(2) : no
Checking for fdatasync(2) : yes
Checking for pread(2) and pwrite(2) : yes
Checking for sendfile(2) : no
Checking for sync_file_range(2) : no
--- libev ---
Checking for header sys/inotify.h : not found
Checking for header sys/epoll.h : not found
Checking for header port.h : not found
Checking for header poll.h : yes
Checking for function poll : yes
Checking for header ['sys/types.h', 'sys/event.h'] : not found
Checking for header sys/queue.h : yes
Checking for function kqueue : not found
Checking for header sys/select.h : yes
Checking for function select : yes
Checking for header sys/eventfd.h : not found
Checking for SYS_clock_gettime : no
Checking for library rt : yes
Checking for function clock_gettime : yes
Checking for function nanosleep : yes
Checking for function ceil : yes
Checking for fdatasync(2) with c++ : yes
'configure' finished successfully (6.400s)
user ~/node-v0.4.12
$ make
Waf: Entering directory `/home/user/node-v0.4.12/build'
DEST_OS: cygwin
DEST_CPU: x64
Parallel Jobs: 1
Product type: program
[ 3/75] cc: deps/c-ares/ares_strcasecmp.c -> build/default/deps/c-ares/ares_strc asecmp_1.o
/usr/bin/gcc -D_GNU_SOURCE -DHAVE_CONFIG_H=1 -g -O3 -DHAVE_OPENSSL=1 -DEV_FORK_E NABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE _SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=1 -DPLATFORM ="cygwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -Idefault/deps /c-ares -I../deps/c-ares ../deps/c-ares/ares_strcasecmp.c -c -o default/deps/c-a res/ares_strcasecmp_1.o
../deps/c-ares/ares_strcasecmp.c:18:24: fatal error: ares_setup.h: No such file or directory
#include "ares_setup.h"
^
compilation terminated.
Waf: Leaving directory `/home/user/node-v0.4.12/build'
Build failed: -> task failed (err #1):
{task: cc ares_strcasecmp.c -> ares_strcasecmp_1.o}
Makefile:11: recipe for target 'program' failed
make: *** [program] Error 1
It will be extremely difficult to install node-v0.4.12 version with Cygwin on your Windows 7, as it's deprecated method. 在Windows 7上使用Cygwin安装node-v0.4.12版本非常困难,因为它已被弃用。
If your requirements forbid you to install the latest Node on Windows using simple installer , and you have to use very old version you mentioned (node-v0.4.12), probably much easier solution would be to install that version on virtual machine with Linux. 如果您的要求禁止您使用简单的安装程序在Windows上安装最新的Node,并且必须使用提到的非常旧的版本(node-v0.4.12),则可能更简单的解决方案是在具有Linux的虚拟机上安装该版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.