我希望在OS X上使用 pyenv 将2.6.6 Python安装为 32位,但得到:
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
尽管已经咨询了Common Build Problems,并应用了那里建议的标志,以及安装Xcode开发人员工具,问题仍然存在。这是完整的命令:
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include -arch i386 -I$(brew --prefix openssl)/include" LDFLAGS="-arch i386 -L$(brew --prefix openssl)/lib" CONFIGURE_OPTS="--with-arch=i386" pyenv install 2.6.6
...但这构建了64位构建,这不是我需要的。
奇怪的是,只有尝试以下内容时,构建才有效:
CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install 2.6.6
我们缺少什么?日志中的以下内容是否意味着我需要一个为i386 / 32位构建的openssl?
ld: warning: ignoring file /usr/local/opt/openssl/lib/libcrypto.dylib, file
was built for x86_64 which is not the architecture being linked (i386):
/usr/local/opt/openssl/lib/libcrypto.dylibld: warning:
ignoring file /usr/local/opt/openssl/lib/libssl.dylib, file was built for
x86_64 which is not the architecture being linked (i386):
/usr/local/opt/openssl/lib/libssl.dylib