2

Starting binary -> can't open shared library

I want to start a binary:

$ my@mypc:~/Machinarium$ ./Machinarium
./Machinarium: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory

e here

(Same happens when I try to start it via linux32 ./Machinarium. It is a 32bit linux binary and I have a 64bit machine. Same with sudo.)


Locating the library (it exists)

I tried to locate it: (fourth line from the bottom is the important one)

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

So what happened? It's clearly there. Why can't it be found?


Install i386 version explicitly

I thought since it's a folder labeled x86_64 this might not be compatible to that 32bit game. So I installed the 32bit version explicitly. (Following that stackoverflow answer.)

me@mypc:~/Machinarium$ sudo apt install libxtst6:i386
libxtst6:i386 already is the newest version (2:1.2.3-1).

(translation by me. This is one line of what the very shord answer by apt says.)


Requirements check -> not found

I checked the requirements for the binary: (I only give you the important line of the output and ignore any other line, if you really need the rest I wonder what for. Just tell me in the comments if needed!)

me@mypc:~/Machinarium$ ldd Machinarium
libXt.so.6 => not found

Question

  • Why doesn't the binary find the shared library?
  • How to fix that?
2

According to the search on https://packages.ubuntu.com the libXt.so.6 is located in libxt6 package.

You can install it with

sudo apt install libxt6:i386

for 32-bit.

| improve this answer | |
  • 1
    I never thought it could be that simple… Thank you! I'll accept your answer as soon as I can – Asqiir Jan 13 '19 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.