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

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 short 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?

1 Answer 1

4

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .