Ubuntu – SDL2 not being loaded correctly by Jedi Acadethe (OpenJK)

executablegamessoftware installation

So I am trying to install Star Wars Jedi Knight Jedi Academy on my laptop, running Ubuntu 13.10. As you may or may not know, this game is quite old and the creators, LucasArts, have only made versions for Mac and Windows. However, fortunately, a few years ago the game's source code was released, and the OpenJk project was born. Essentially they are rewriting the games code, and have made it so that you can play the game on linux, without wine, as smoothly as it plays on other operating systems.

Link to GitHub page.

The compilation and everything worked absolutely fine, and there is nothing wrong with OpenJK as far as I know, and I know people who use it in linux, my problem appears to be SDL2. Or rather, my apparent lack of it.

When I try to execute the file that should start the game, I get this error:

./openjk.x86_64: error while loading shared libraries: libSDL2.so.0: cannot open shared object file: No such file or directory

Well, as far as I know I do have SDL2, having done this:

sudo apt-get install libsdl2-2.0-0

and this

sudo apt-get install libsdl2-dev

Also, I have visited several sites with guides on installing this, and have installed a ridiculous amount of dependencies for SDL2. SO I presume I have them all. If you think you may have found a list I have not, feel free to post it below for me to try.

And, as a final step before I went ahead and posted this question, I downloaded the most recent sdl2.tar.gz from the website, extracted the files, and ran:

./configure; make; sudo make install

And the installation worked, so this left me even more confused after I ran

sudo ldconfig

and still the Jedi Academy file returned the same error.

Unfortunately, it seems like the SDL2 I have is not good enough for Jedi Academy, and therefore is not good enough for me ):

Does anyone know what the root of the problem is here? Is it with OpenJK, or with SDL2, or do I need to get a different version perhaps? Any thoughts or help would be greatly appreciated, as I am at a loss.

Best Answer

This is not the right way to do it, but there are no other answers, and this worked for me. I've always had similar problems locating SDL libs. It helped me to find out where are the libraries installed.

Last time I installed libsdl2-dev, apt-get said (in /var/lib/dpkg/info/libsdl2-dev.list) that the *.so where:


Usually, programs using SDL will search in /usr/lib/ or /usr/local/lib/, so you can try copying it in those paths and renaming it to libSDL2.so.0, which is the name openjk doesn't find.

Or a symlink:

ln -s /usr/lib/x86_64-linux-gnu/libSDL2.so /usr/lib/libSDL2.so.0
ln -s /usr/lib/x86_64-linux-gnu/libSDL2.so /usr/local/lib/libSDL2.so.0