我在 Mac OS X 10.6 上 - 我尝试通过自制软件安装节点,但失败并显示非描述性错误消息。我决定克隆节点存储库并在目录中构建它。运行 ./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 : 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 : not found
Checking for fdatasync(2) with c++ : no
'configure' finished successfully (2.180s)
运行 'make' 时,构建失败,我收到此错误:
System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:70:35: error: SecurityHI/SecurityHI.h: No such file or directory
Waf: Leaving directory `/Users/topica/rails_projects/node/out'
Build failed: -> task failed (err #1):
{task: cxx platform_darwin.cc -> platform_darwin_5.o}
make: *** [program] Error 1
尽管 openssl 说“未找到”,但为了安全起见,我使用以下命令重新运行了 configure:./configure --openssl-includes=/opt/local/include 和 openssl 但仍然出现相同的错误。
前几天我确实安装了 gcc,gcc -v 的输出是:
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~123/src/configure --disable-checking --enable- werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program- transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 - -program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
也许我的 xcode 安装和 gcc 有一些冲突?或者完全是别的东西。我已经解决了几天,但无法找到任何答案。让我知道还需要什么其他信息
更新:这是运行 ./configure --openssl-includes=/opt/local/include 时的控制台输出
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 function SSL_library_init : yes
Checking for header openssl/crypto.h : yes
Checking for library util : yes
Checking for library rt : not found
Checking for fdatasync(2) with c++ : no
'configure' finished successfully (0.660s)