I'm trying to run a game (PRIME, an old Rougelike found here) and after downloading the 64 bit linux version, and going to run it, I get this error response:

./prime: error while loading shared libraries: libsigsegv.so.2: cannot open shared object file: No such file or directory

Now, I've checked that I've got that file in my library, and it's up to date. The last time I asked this question I was able to solve it simply with a sudo-apt-update, sudo-apt-upgrade. That isn't working this time.

(The italicized note above is technically a mistake. I did have that file, but not the i386 version. Take a look at the accepted answer and my comments to see how we discovered that!)

My real item is this, though: Shared library problems are a pretty common error, it seems, and although the library in question changes, the other common issue is that the library exists, but for some reason the executable (or the user?) can't find it?

This is also not the first time I've had this issue on this system.

Is there a general solution or approach to shared library problems?

I came across this using ldconfig but I haven't been able to get it to work.

output of ldd ./prime in the directory with that executable

    linux-gate.so.1 (0xf7f03000)
libsigsegv.so.2 => not found
libnoteye.so => ./libnoteye.so (0xf7e4f000)
libncurses.so.5 => /lib/i386-linux-gnu/libncurses.so.5 (0xf7e26000)
libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xf7e00000)
libpanel.so.5 => /usr/lib/i386-linux-gnu/libpanel.so.5 (0xf7df9000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf7c1b000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7b16000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7af7000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7908000)
libSDL-1.2.so.0 => not found
libSDL_image-1.2.so.0 => not found
liblua5.1.so.0 => not found
libutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xf7901000)
libSDL_mixer-1.2.so.0 => not found
libSDL_net-1.2.so.0 => not found
libGL.so.1 => /usr/lib/i386-linux-gnu/libGL.so.1 (0xf7894000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7876000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7870000)
/lib/ld-linux.so.2 (0xf7f04000)
libGLdispatch.so.0 => /usr/lib/i386-linux-gnu/libGLdispatch.so.0 (0xf77f3000)
libGLX.so.0 => /usr/lib/i386-linux-gnu/libGLX.so.0 (0xf77b7000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7666000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf7637000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7631000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf7629000)
libbsd.so.0 => /usr/lib/i386-linux-gnu/libbsd.so.0 (0xf760a000)
  • 1
    Is libsigsegv2 on your system? ldconfig -p | grep libsigsegv2
    – nobody
    Oct 31, 2020 at 18:41
  • 1
    It is! I checked in Synaptic, and running your command gets me this: libsigsegv.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libsigsegv.so.2 Oct 31, 2020 at 20:45
  • 1
    I'll try to check this tomorrow.
    – nobody
    Nov 1, 2020 at 10:52
  • I'm sorry I can't get it started in my ubuntu only in Debian.
    – nobody
    Nov 3, 2020 at 11:08
  • Could you add output of ldd ./prime .I'm not familiar with it, if it is script check the program it uses. Also try force reinstalling of that lib sudo apt --reinstall install libsigsegv2
    – user.dz
    Nov 3, 2020 at 11:21

2 Answers 2


From ldd, it is clear that prime is a 32bit/i386 build. It requires dependencies from same architecture. We may confirm too using:

file ./prime

We search for each missing library file using apt-file (if installed, be aware it downloads large indexes) or https://packages.ubuntu.com for corresponding package then install it.

sudo apt install libsigsegv2:i386 \
libsdl1.2debian:i386 libsdl-image1.2:i386 liblua5.1-0:i386 \
libsdl-mixer1.2:i386 libsdl-net1.2:i386 
  • Okay! This worked. Nov 4, 2020 at 17:42
  • 1
    Could you tell the missing libs were i386 because the other libs that were listed were i386? @user.dz Nov 4, 2020 at 17:43
  • @JasonMehmel yes, also you can confirm with file ./prime
    – user.dz
    Nov 4, 2020 at 17:44

For a so called 64-bit application prime needs a bunch i386 libaries. sudo dpkg --add-architecture i386 afterwards sudo apt update

Make sure the not founding libaries are installed for 64-bit and 32-bit.

You can found the relevant packages with apt-file search missing file.

maybe you have to install it sudo apt install apt-file and sudo apt-file update

enter image description here

How to use apt-file

  • Doing the i386 add didn't work for me. Will try installing lib files bit by bit. Did you have to add a bunch of libraries to get it going? Also, the list from ldd shows lib files that are definitely installed. Which is what leads me to the main question. Is it that the executable isn't able to see it somehow? It isn't that I'm missing the lib files, it's that the program can't find them when it tries to run. Nov 4, 2020 at 17:05
  • Used apt-file to try to examine for the lib files. libsigsegv.so.2 was one I could find, but tried updating it anyway, no dice. Nov 4, 2020 at 17:22
  • did you have any missing libraries when you first tried to run this program? Nov 4, 2020 at 17:22
  • 1
    @JasonMehmel, no on ubuntu I had no multiarch and I get some stupied message file not found, when I try to start it. After adding multiarch, I started the game with strace and saw, it was querring 32-bit libs. file -l ./prime shows much old stuff so I started to install missing libs in 64-bit and 32-bit.
    – nobody
    Nov 4, 2020 at 18:47
  • That lines up with the other answer we found! Nov 5, 2020 at 19:28

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.