Ubuntuで"warning: openssl/ssl.h: No such file or directory"

Ubuntuでgit 1.8.2をコンパイルしようとしたらエラー。
dqneo@colinux:~/src/git-1.8.2$ sudo  make prefix=/usr install install-doc install-html install-info
    CC credential-store.o
In file included from cache.h:4,
                 from credential-store.c:1:
git-compat-util.h:212:25: warning: openssl/ssl.h: No such file or directory
git-compat-util.h:213:25: warning: openssl/err.h: No such file or directory
In file included from credential-store.c:1:
cache.h:11:21: warning: openssl/sha.h: No such file or directory
cache.h:19:18: warning: zlib.h: No such file or directory
In file included from credential-store.c:1:
cache.h:21: error: expected specifier-qualifier-list before 'z_stream'
make: *** [credential-store.o] Error 1
"warning: openssl/ssl.h: No such file or directory"というのは、opensslのライブラリが入ってないのが原因のようです。
Ubuntuではopensslのライブラリは"libssl-dev"という名前なので、apt-getで入れてあげましょう。
sudo apt-get install libssl-dev
これで解決しました!
カテゴリ: