12

I downloaded the game pacapong for Linux and tried to run the executable, which results in the error:

$ ./runner 

./runner: error while loading shared libraries: libopenal.so.1: 
cannot open shared object file: No such file or directory

Obviously, there is the necessity of loading libopenal.so.1:

$ objdump -p ./runner |grep libopenal.so.1

NEEDED libopenal.so.1

There is libopenal.so.1 lying in /usr/lib/x86_64-linux-gnu and I can do:

$ ldd libopenal.so.1
linux-vdso.so.1 =>  (0x00007fffcdbbb000)

...

I won't run this executable (./runner) as root (just in case this problem could be related to insufficient rights, what I'm not assuming).

So, what could I try else?

JoKeR
  • 7,062
de-facto
  • 253

3 Answers3

14

The error is because this is a 32-bit game that you are trying to run in 64-bit Linux. I worked through the errors by googling error messages to figure out what packages I was missing. I ended up installing the following packages to get the game to run:

sudo apt-get install libxxf86vm1:i386 libglu1-mesa:i386 libopenal1:i386 libssl1.0.0:i386
1

For the future, running ldd on ./runner will tell you the libraries it requires, if they're missing, AND if they're i386 or 64-bit.

$ ldd on ./runner

/undertale/game$ ldd ./runner

linux-gate.so.1 (0xf7798000)

libgtk3-nocsd.so.0 => /usr/lib/i386-linux-gnu/libgtk3-nocsd.so.0 (0xf7759000)

libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf75d3000)

...

libXrandr.so.2 => not found

libbsd.so.0 => /lib/i386-linux-gnu/libbsd.so.0 (0xf6b41000)

libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf6b3d000)

libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf6b36000)

Note I'm still missing xrandr for i386. So this isn't going to work yet.

$ ./runner

./runner: error while loading shared libraries: >libXrandr.so.2: cannot open shared object file: No such file or directory

1

Use apt-file tool to find out which package provides the required library. If you do not have the search tool first install it

sudo apt-get install apt-file

If this is the first time you are going to use apt-file tool you must update cache first

apt-file update # it may require root privileges. If so just use sudo

Now search the library:

apt-file search libXrandr.so.2
libxrandr2: /usr/lib/x86_64-linux-gnu/libXrandr.so.2
libxrandr2: /usr/lib/x86_64-linux-gnu/libXrandr.so.2.2.0

Now install the 32 bit package you need

sudo apt-get install libxrandr2:i386
Enrique
  • 21