macos - mac osx 10.11 compiles git 2.6.1 and reports an error
高洛峰2017-05-02 09:23:55
0
4
600
CC credential-store.o In file included from credential-store.c:1: In file included from ./cache.h:4: ./git-compat-util.h:270:10: fatal error: 'openssl/ssl.h' file not found
Execute xcode-select -p to print the working directory of Xcode: Mine is /Library/Developer/CommandLineTools
Enter the directory cd /Library/Developer/CommandLineTools/usr/include
Find the include directory in the openssl installation directory. There is an openssl folder in this directory with the required files. Copy the entire openssl folder over there
The main reason is that there is no longer the openssl header file in the Xcode-select directory. You only need to copy the installed openssl header file to solve the problem. If you cannot find the installation location of openssl, you can also brew install Install openssl and then go to the brew installation directory to find it
OS X itself comes with openssl, because in OS X 10.11 Apple removed the openssl header file and retained the openssl dynamic link library.
openssl not found, can be solved by installing openssl
没装libssl-dev没装。
http://stackoverflow.com/questions/3368683/how-to-compile-c-file-with-openssl-includes
Install Xcode-select command line tool
Execute xcode-select -p to print the working directory of Xcode: Mine is /Library/Developer/CommandLineTools
Enter the directory cd /Library/Developer/CommandLineTools/usr/include
Find the include directory in the openssl installation directory. There is an openssl folder in this directory with the required files. Copy the entire openssl folder over there
The main reason is that there is no longer the openssl header file in the Xcode-select directory. You only need to copy the installed openssl header file to solve the problem. If you cannot find the installation location of openssl, you can also brew install Install openssl and then go to the brew installation directory to find it