ldconfig
http://www.infraeye.com/study/linuxz6.html
他のプログラムから利用するプログラム
ライブラリ | 説明 | メリット | デメリット |
---|---|---|---|
静的ライブラリ | プログラム作成時にその実行ファイル内に組み込まれたライブラリ | 1つのプログラムだけで動作するので別環境で動作可 | プログラムのファイルが大きい |
共有ライブラリ | プログラム実行時にロードされて複数のプログラム間で共有 | プログラムのサイズが小さい | プログラム実行時に適切に配置されたライブラリが必要 |
プログラムからライブラリの機能を呼び出す
リンク | 説明 |
---|---|
スタティックリンク | プログラム作成時にライブラリの機能をプログラム本体に組み込む。静的ライブラリ |
ダイナミックリンク | プログラム実行時にライブラリの機能を呼び出す。共有ライブラリ |
http://itpro.nikkeibp.co.jp/article/COLUMN/20140127/532504/
- ldconfigで共有ライブラリのリンク情報を作成/更新する
- キャッシュファイルからライブラリを呼び出す
- confファイル /lib /usr/lib /etc/ld.so.conf.d/* の設定を読み込む
ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories, /lib and /usr/lib (on some 64-bit architectures such as x86-64, lib and /usr/lib are the trusted directories for 32-bit libraries, while /lib64 and /usr/lib64 are used for 64-bit libraries).
Oracleのアレ
https://askubuntu.com/questions/159939/how-to-install-sqlplus http://d.hatena.ne.jp/rougeref/20160126
- Ubuntu 17.10
- 共有ライブラリの情報がないと怒られる
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
/etc/ld.so.conf.d/oracle-lib.conf
を作成して、/usr/lib/oracle/#{version}/client/lib
を書き込む- ldconfigで共有ライブラリの情報を追加する