Fix openssl/aes.h file not found on Mac OS X 10.11 El Capitan




Phenomenon:
Error when installing pyOpenSSL:

build/temp.macosx-10.10-x86_64-2.7/_openssl.c:400:10: fatal error: 'openssl/aes.h' file not found
Try the solution:
first brew install openssl and find that it has been Install
and then use the xcode-select -p command to find the directory where xcode is installed.
For example, the command to get the installation directory is: /Applications/Xcode.app/Contents/Developer
and then go to /Applications/Xcode.app/Contents/Developer and find ssl.h

cd /Applications/Xcode.app/Contents/Developer && find . -name ssl.h
to get the directory where ssl.h is located, for example: ./Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/ usr/include/openssl/ssl.h
and then copy the entire openssl directory to /usr/local/include/:

cp -R /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ swift-migrator/sdk/MacOSX.sdk/usr/include/openssl /usr/local/include/
Install again, problem solved

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326568598&siteId=291194637