Node 0.4.1 无法编译

Node 0.4.1 无法编译

我正在尝试使用n(或仅使用 make)编译 node (v0.4.1),并出现与 openssl 相关的错误。我在发出编译命令之前(重新)安装了 openssl,但 node 报告了此错误openssl : not found。您可以在我的最后一个命令中查看 openssl 的版本OpenSSL 1.0.1 14 Mar 2012

有人能提供一个可以让我编译节点的解决方案吗?

sysadmin@serv:/usr/local/n/node-v0.4.1$ sudo n 0.4.1
/usr/bin/node
######################################################################## 100.0%
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   : yes 
Checking for header openssl/crypto.h     : 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)                : yes 
Checking for fdatasync(2)                : yes 
Checking for pread(2) and pwrite(2)      : yes 
Checking for sendfile(2)                 : yes 
Checking for sync_file_range(2)          : yes 
--- libev ---
Checking for header sys/inotify.h        : yes 
Checking for function inotify_init       : yes 
Checking for header sys/epoll.h          : yes 
Checking for function epoll_ctl          : yes 
Checking for header port.h               : not found 
Checking for header poll.h               : yes 
Checking for function poll               : yes 
Checking for header 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        : yes 
Checking for function eventfd            : yes 
Checking for SYS_clock_gettime           : yes 
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 (22.933s)
Waf: Entering directory `/usr/local/n/node-v0.4.1/build'
DEST_OS: linux
DEST_CPU: ia32
Parallel Jobs: 4
Product type: program
[51/74] libv8.a: deps/v8/SConstruct -> build/default/libv8.a
/usr/bin/python "/usr/local/n/node-v0.4.1/tools/scons/scons.py" -j 4 -C "/usr/local/n/node-v0.4.1/build/default/" -Y "/usr/local/n/node-v0.4.1/deps/v8" visibility=default mode=release arch=ia32 toolchain=gcc library=static snapshot=on 
scons: Reading SConscript files ...

scons: warning: Ignoring missing SConscript 'obj/test/release/SConscript'
File "/usr/local/n/node-v0.4.1/deps/v8/SConstruct", line 1201, in BuildSpecific
scons: done reading SConscript files.
scons: Building targets ...
scons: `library' is up to date.
scons: done building targets.
[73/74] cxx: src/node_crypto.cc -> build/default/src/node_crypto_4.o
/usr/bin/g++ -pthread -m32 -g -O3 -DHAVE_OPENSSL=1 -DEV_FORK_ENABLE=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="linux" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/v8/include -I../deps/v8/include -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/linux-ia32 -I../deps/c-ares/linux-ia32 -Ideps/v8/include ../src/node_crypto.cc -c -o default/src/node_crypto_4.o
../src/node_crypto.cc: In static member function ‘static v8::Handle<v8::Value> node::crypto::SecureContext::Init(const v8::Arguments&)’:
../src/node_crypto.cc:75:29: error: ‘SSLv2_method’ was not declared in this scope
../src/node_crypto.cc:77:36: error: ‘SSLv2_server_method’ was not declared in this scope
../src/node_crypto.cc:79:36: error: ‘SSLv2_client_method’ was not declared in this scope
Waf: Leaving directory `/usr/local/n/node-v0.4.1/build'
Build failed:  -> task failed (err #1): 
        {task: cxx node_crypto.cc -> node_crypto_4.o}
make: *** [install] Error 1
sysadmin@serv:/usr/local/n/node-v0.4.1$ openssl version
OpenSSL 1.0.1 14 Mar 2012
sysadmin@serv:/usr/local/n/node-v0.4.1$ 

相关内容