Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 26 down vote accepted

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|improve this answer
Turns out it was "libcurl4-openssl-dev". Not sure what libcurl has do do with SSL or SHA256, but it worked. – tkbx Aug 20 '13 at 16:23
@tkbx /usr/include/openssl/sha.h is in libssl-dev in oldstable, stable and unstable. – Gilles Aug 20 '13 at 22:43
it's a common mistake to put openssl-dev instead libssl-dev :) please mauro fix your answer. – erm3nda Mar 22 '14 at 7:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.