0

我希望在 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
4

0 回答 0