gpt4 book ai didi

node.js - 使用 OpenSSL 支持编译 Node.js

转载 作者:太空宇宙 更新时间:2023-11-03 13:26:44 25 4
gpt4 key购买 nike

大家好,按照这组说明尝试远程安装 Node.js here

wget http://nodejs.org/dist/node-v0.4.10.tar.gz 
tar -zxvf node-v0.4.10.tar.gz
cd node-v0.x.x
./configure --prefix=~/node
make
make test
make install

这应该让我在 ~/node 下安装 nodejs 但是,在 ./configure --prefix=~/node 期间我遇到了这个依赖要求:

node-v0.4.10]$ ./configure --prefix=~/node
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
/opt/server/node-v0.4.10/wscript:341: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message.
[tomcat@test.dev node-v0.4.10]$ make
Project not configured (run 'waf configure' first)
make: *** [program] Error 1

我已经检查了 open ssl 在盒子上:

node-v0.4.10]$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

~]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

不确定它们还有哪些其他依赖项,一直在寻找配置文件

最佳答案

Node.js 已经针对最流行的 distributions 进行了打包.

如果我的猜测是正确的,并且您使用的是 CentOS 6 或类似系统,则以下命令应该可以正常工作:

sudo yum install nodejs npm --enablerepo=epel

关于node.js - 使用 OpenSSL 支持编译 Node.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26270315/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com