search

Home  >  Q&A  >  body text

macos - mac osx 10.11 compiles git 2.6.1 and reports an error

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

include <openssl/ssl.h>

     ^

1 error generated.
make: * [credential-store.o] Error 1

如何整?

高洛峰高洛峰2811 days ago620

reply all(4)I'll reply

  • 巴扎黑

    巴扎黑2017-05-02 09:25:55

    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.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:25:55

    openssl not found, can be solved by installing openssl

    reply
    0
  • ringa_lee

    ringa_lee2017-05-02 09:25:55

    没装libssl-dev没装。
    http://stackoverflow.com/questions/3368683/how-to-compile-c-file-with-openssl-includes

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-02 09:25:55

    1. Install Xcode-select command line tool

    2. Execute xcode-select -p to print the working directory of Xcode: Mine is /Library/Developer/CommandLineTools

    3. Enter the directory cd /Library/Developer/CommandLineTools/usr/include

    4. 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

    reply
    0
  • Cancelreply