SOFTELメモ Developer's blog

error while loading shared libraries: xxx.so cannot open shared object file: No such file or directory

2015/10/02 linux

問題

courier-imap でIMAPサーバーしようとしていたら、すぐ切断されてしまいうまくいきません。

/var/log/maillog には以下のようなエラーがありました。

error while loading shared libraries: libcourier-unicode.so.3: cannot open shared object file: No such file or directory

答え

ソースからコンパイルした courier unicode の libcourier-unicode.so など、/usr/local/lib に作られたファイルは、環境によっては勝手に読み込んでくれないかもしれない。

/usr/local/lib を読み込みの対象に加えるには、LD_LIBRARY_PATH にパスを追加したい。

1、/etc/ld.so.conf.d/locallibs.conf のようなファイル名で、以下の1行を書き込み(# vim /etc/ld.so.conf.d/locallibs.conf)

/usr/local/lib

2、設定を適用

# ldconfig

関連するメモ

コメント