Skip to main content

Error loading shared library libSDL-1.2 [Resolved]

I've tired to compile ToME 3 game but I can't run it, I've got:

tome3: error while loading shared libraries: cannot open shared
object file: No such file or directory

I have installed libstd1.2 both devel and runtime packages. I have that library

$ ls /usr/lib/x86_64-linux-gnu/libSDL*

I've tried to put /usr/lib/x86_64-linux-gnu/ into PATH and also copy to the directory where I have the game, but it not work.

Someone ask the same question on AskUbuntu the solution was to reinstall the lib but it don't work.

Question Credit: jcubic
Question Reference
Asked September 17, 2019
Posted Under: Unix Linux
2 Answers

Run ldd on the game's binary (t-engine) to see what exactly it's looking for and whether it resolves.

See the paths that are searched and what is found by using strace -e file t-engine. If you see some paths being searched for libSDL but not the path where your libSDL is (/usr/lib/x86_64-linux-gnu/), then see if you can figure out why.

My guess is that t-engine is compiled for i386 (32-bit) and your SDL libraries are compiled for x86_64 (64-bit).

credit: RJHunter
Answered September 17, 2019

Is there an entry somewhere in /etc/ for your library/library's directory ?


ldconfig -vp |grep SDL-1.2

if you've installed a new library, then you should simply refresh

sudo ldconfig -v

credit: X Tian
Answered September 17, 2019
Your Answer