共有オブジェクトファイルがライブラリパスにあり、見つかりません。

共有オブジェクトファイルがライブラリパスにあり、見つかりません。

ソースからplexmediaplayerをインストールしようとしています。これには、/usr/local/libの下に完了してインストールしたlibmpv.so.1のコンパイルが含まれます。

plexmediaplayerを実行すると、次のエラーが発生します。

$ plexmediaplayer 
plexmediaplayer: error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory

ldconfigはライブラリを正しく検索します。

$ ldconfig -v | grep libmpv
libmpv.so.1 -> libmpv.so.1.24.0

plexmiediaplayerバイナリのlddはlibmpvを示しています:

$ ldd plexmediaplayer | grep libmpv
libmpv.so.1 => /usr/local/lib/libmpv.so.1 (0x00007f2fe4f33000)

これはシンボリックリンクです:

ls -l /usr/local/lib/libmpv.so.1
lrwxrwxrwx 1 root root 16 Feb  9 20:37 /usr/local/lib/libmpv.so.1 -> libmpv.so.1.24.0

共有オブジェクトと実行可能ファイルは両方ともx86_64用にコンパイルされ、plexmediaplayerを実行したいルート以外のユーザーが読み取ることができます。

$ file /usr/local/lib/libmpv.so.1.24.0
/usr/local/lib/libmpv.so.1.24.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=855d9cbf952c76e3c0c1c1a162c4c94ea5a12b91, not stripped
$ file /usr/local/bin/plexmediaplayer 
/usr/local/bin/plexmediaplayer: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=dc92ac026c5ac7bc3e5554a591321de81a3f4576, not stripped

これらはすべて私の機械アーキテクチャと一致しています。

$ uname -a
Linux hostname 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

plexmediaplayerでstraceを実行すると、次の結果が表示されます。

$ strace -o lotsalogs -ff -e trace=file plexmediaplayer
open("/opt/Qt5.8.0/5.8/gcc_64//lib/tls/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/Qt5.8.0/5.8/gcc_64//lib/tls/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/Qt5.8.0/5.8/gcc_64//lib/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/Qt5.8.0/5.8/gcc_64//lib/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
open("/lib/x86_64-linux-gnu/tls/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/tls/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/tls/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

含む:

open("/usr/local/lib/libmpv.so.1", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)

ただし、シンボリックリンクを介したファイルに対する権限は次のとおりです。

ls -l /usr/local/lib/libmpv.so.1.24.0 
-rwxr-xr-x 1 root root 27872856 Mar 22 22:17 /usr/local/lib/libmpv.so.1.24.0

なぜ私のバイナリがこれを見つけることができないのか知っていますか?

/usr/local/lib編集:libmpvとplexmediaplayerの下のすべての項目を消去し、/usr/local/binソースディレクトリごとに削除してから、仮想マシンに並べて再インストールしました。仮想マシンのビルドは機能しますが、ホストマシンのビルドは機能しません。私も両方のコンピュータでldをハッシュして(驚くべきことではなく)一致します。

ベストアンサー1

わかりましたら、数ヶ月前にplexmediaplayer用の衣類を整理していましたが、アップデートや再コンパイル時に問題が発生しました。

おすすめ記事