tabimoba.net

とあるエンジニアの雑記帳

CentOSでソースからインストールしたライブラリがNot Foundになる場合の対応方法

CentOS5なサーバへgitをソースからインストールしたところ、以下のエラーメッセージが表示されました。

/usr/local/git/bin/git: error while loading shared libraries: libiconv.so.2:cannot open shared object file: No such file or directory

libiconvはソースからインストールしていましたが、ライブラリがないといわれました。

以下の通り/etc/ld.so.confを編集し、「/usr/local/lib」の行を追加して解決しました。

# vi /etc/ld.so.conf
/usr/local/lib
# ldconfig