启动二进制文件 -> 无法打开共享库
我想启动一个二进制文件:
$ my@mypc:~/Machinarium$ ./Machinarium
./Machinarium: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
这里
(当我尝试通过linux32 ./Machinarium
.
找到图书馆(它存在)
我试图找到它:(底部的第四行是重要的)
me@mypc:~/Machinarium$ locate libXt
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libXt.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libXtst.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libXt.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libXt.so.6.0.0
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libXtst.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libXtst.so.6.1.0
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/amd64/usr/lib/x86_64-linux-gnu/libXt.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/amd64/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/amd64/usr/lib/x86_64-linux-gnu/libXtst.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/amd64/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libXt.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libXt.so.6.0.0
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libXtst.so.6
/home/me/.local/share/Steam/ubuntu12_32/steam-runtime.old/i386/usr/lib/i386-linux-gnu/libXtst.so.6.1.0
/usr/lib/x86_64-linux-gnu/libXt.a
/usr/lib/x86_64-linux-gnu/libXt.so
/usr/lib/x86_64-linux-gnu/libXt.so.6
/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0
/usr/lib/x86_64-linux-gnu/libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
所以发生了什么事?它显然在那里。为什么找不到?
显式安装 i386 版本
我想,因为它是一个标有x86_64
这可能与那个 32 位游戏不兼容的文件夹。所以我明确安装了 32 位版本。(按照stackoverflow的答案。)
me@mypc:~/Machinarium$ sudo apt install libxtst6:i386
libxtst6:i386 already is the newest version (2:1.2.3-1).
(由我翻译。这是 apt 非常简短的回答中的一行。)
需求检查 -> 未找到
我检查了二进制文件的要求:(我只给你输出的重要行,而忽略任何其他行,如果你真的需要其余的,我想知道为什么,如果需要,请在评论中告诉我!)
me@mypc:~/Machinarium$ ldd Machinarium
libXt.so.6 => not found
问题
- 为什么二进制文件找不到共享库?
- 如何解决?
根据在https://packages.ubuntu.com上的搜索, libXt.so.6位于
libxt6
package中。你可以安装它
对于 32 位。