make fatal error: openssl/sha.h: No such file or directory

129,940

probably you are missing the openssl header files. depending on your distribution this package might have a different name, mostly it's something like openssl-dev or openssl-devel. after you installed the openssl header files, the compiler should be able to find openssl/sha.h.

In Ubuntu/Debian the package is called libssl-dev.

Share:
129,940

Related videos on Youtube

tkbx
Author by

tkbx

Human

Updated on September 18, 2022

Comments

  • tkbx
    tkbx over 1 year

    I'm trying to compile a program that, according to the documentation, requires the "OpenSSL library". I have OpenSSL installed, and it's still giving me the error openssl/sha.h: No such file or directory. Is there some other library that has to be installed?

  • tkbx
    tkbx over 10 years
    Turns out it was "libcurl4-openssl-dev". Not sure what libcurl has do do with SSL or SHA256, but it worked.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' over 10 years
    @tkbx /usr/include/openssl/sha.h is in libssl-dev in oldstable, stable and unstable.
  • voices
    voices over 5 years
    FYI: I already had libcurl4-openssl-dev installed. libssl-dev sorted this for me.