Error while loading shared libraries: libopenal.so.1 (Game 'pacapong' in Ubuntu 14.10)

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?


Solution 1:

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

Solution 2:

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