I am trying to install ioquake on my ubuntu server.

When I try to run it, I get this message:

# ./ioquake3
./ioquake3.x86_64: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory

I thought I had everything working right, here is where the libSDL is:

# cd /usr/lib64
# /usr/lib64# ls -l
total 2308
lrwxrwxrwx 1 root root      15 Oct 15 00:25 libSDL-1.1.so.0 -> libSDL-1.2.so.0
lrwxrwxrwx 1 root root      20 Oct 15 00:25 libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.4
-rwxr-xr-x 1 root root 2358903 Jan 19  2012 libSDL-1.2.so.0.11.4

And my path:

# echo $PATH

What am I doing wrong?

  • 3
    I think that this is a message from libSDL rather than about libSDL. Run strace ./ioquake.x86_64. This will show all system calls (takes way more time to execute). It will show which attempt to open which file will fail.
    – January
    Oct 15 '12 at 5:02
  • I installed trace. When I run it straight up, I get the help. When I run strace ./ioquake.x86_64 as you suggested I get command not found. I'm getting a headache :(
    – ErocM
    Oct 15 '12 at 5:15
  • I installed strace*
    – ErocM
    Oct 15 '12 at 5:20
  • From the OpenArena FAQ, this message appears when libSDL isn't installed, so I don't think it came from it. Not the best idea, but just to be sure, have you tried to rename libSDL-1.2.so.0.11.4 into libSDL-1.2.so.0 ?
    – NorTicUs
    Oct 15 '12 at 11:12
  • even if the first worked for you: please mark the second (23 upvotes) as answer as it is actually right for 99% of people.
    – tatsu
    May 28 '17 at 13:00

This worked for me:

sudo apt-get install libsdl1.2debian:i386

  • 3
    this is the better answer this should be marked as answer.
    – tatsu
    May 28 '17 at 12:59
  • 1
    The current chosen answer tells us to apt update and apt reinstall, but you don't need any of that, all you need is to install the i386 architecture of libsdl. This should be the correct answer. Aug 13 '20 at 1:54
  • I needed to install libsdl1.2debian, not libsdl1.2debian:i386, in order to get OpenArena to open in Ubuntu 20.04.
    – kas
    Nov 18 '20 at 6:12
  • Note that i386 is for 32-bit, so you don't need it for 64-bit machine - meaning you can just do sudo apt-get install libsdl1.2debian
    – tsveti_iko
    Jan 12 at 15:07
  • @tsveti_iko well it's been a few years, maybe ioquake needed the 32 bit version even on a 64 bit machine?
    – Joril
    Jan 13 at 9:34

Try the following in terminal:

sudo apt-get update

followed by

sudo apt-get install --reinstall libsdl1.2debian

Post any error messages you might see

sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
  • 3
    May you include some explanation on what the problem is and how running the above command would solve it? Mar 22 '17 at 8:32
  • actually the user applications uses the above library inorder to dump text or images on to the SDL window
    – jagadeesh
    Mar 22 '17 at 11:07
  • I mean include explanation in the answer. Yet, I think this explanation is not enough. Mar 22 '17 at 11:20

I know this is a year late. But this should fix it:

dpkg --add-architecture i386
sudo apt-get install libsdl1.2debian

The problem is that you are running a program compiled for a 32 bit architecture with 64 bit libraries.

  • 4
    Alternatively sudo apt-get install libsdl1.2debian:i386
    – Joril
    Jun 5 '14 at 19:26
  • 1
    @Joril I think your comment should be an answer as itself Jul 18 '14 at 3:28

This question is still relevant to Ubuntu 14.04 for old but still in use programs such as GCCG (Generic Collectible Card Game).

There are two very large answers on the subject:

  1. How to run 32-bit app in Ubuntu 64-bit?
  2. How to install ia32-libs in Ubuntu 14.04 LTS (Trusty Tahr)

No one else's answer solved this for me. This did though:

$ sudo apt-get install libsdl1.2debian libsdl-image1.2 libsdl-ttf2.0-0 libopenal1 libsndfile1 libncursesw5

Something to do with 64 bit dependencies not being installed due to 32 bit libraries, I'm not sure.

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.