2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

error while loading shared librariesの解決法(備忘録)

Posted at

背景

外部ライブラリを使ったプログラムの実行時、

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

というエラーが起こる場合がある。(上記エラーはHDF5というライブラリを使用したプログラムを実行した際のエラー)

動作環境

WSL Ubuntu18.04

解決法

bashrcにLD_LIBRARY_PATHを追加する。以下をbashrcに追記。

export LD_LIBRARY_PATH=/home/hogehoge/lib/hdf5/lib:$LD_LIBRARY_PATH

今回はhome下にlibディレクトリを置き、そのディレクトリ内にライブラリをインストールしていることを想定。

source ~/.bashrc

追記したらsourceしておく

自分の環境では無事に解決した。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?