问题
I'm looking to install the 2.6.6 Python as 32-bit with pyenv on OS X, but get:
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Despite having consulted Common Build Problems, and applying the flags suggested there, as well as installing Xcode developer tools, the problem persists. Here is the full command:
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
... but this builds the 64-bit build, which is not what I need.
Oddly, the build works when just the following is tried:
CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install 2.6.6
What are we missing? Does the following from the log imply that I need an openssl which was built for i386 / 32-bit?
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
来源:https://stackoverflow.com/questions/34832512/unable-to-install-32-bit-python-with-pyenv-despite-appropriate-flags-set