ruby1.9.2 で opensslがインストールできない

久しぶりにサーバーを構築していたらこんな問題に遭遇。

環境

OS : debian
ruby1.9.2 p290
rubyはソースからインストールしました。

opensslのインストール

rubyのopensslフォルダに移動

$ cd src/ruby-1.9.2-p290/ext/openssl/
$ ruby extconf.rb

すると、こんなエラーが。

=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.

ググったらこんな情報を発見。
http://www.kano4.com/259

libssl-dev というものが必要のよう。
やってみる。

# aptitude install libssl-dev


その後は、順調にインストールが完了しました。

$ cd src/ruby-1.9.2-p290/ext/openssl/
$ ruby extconf.rb
$ make
# make install

貴重な情報ありがとうございました。