Error loading shared library libSDL-1.2

12,409

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).

Share:
12,409

Related videos on Youtube

Tim
Author by

Tim

My name is Jakub T. Jankiewicz, I'm coding mostly in JavaScript. I love Lisp Macros, jQuery library, ReactJS, CSS3, HTML5, SVG, GNU/Linux, GNU Emacs and Inkscape. Working with JavaScript and R for Roche/Genentech via Astek Poland. my english blog - In Code We Trust my polish blog - Głównie JavaScript (ang. Mostly JavaScript) Usefull Links Other links Yet another links Few of my JavaScript Open Source projects: jQuery Terminal: JavaScript library for Web based Terminal Emulator LIPS - Powerful Scheme based lisp interpreter written in JavaScript sysend.js: Library for sending messages between Windows and Tabs Gaiman Programming Language and Text based Game engine GIT Web Terminal Posts: EchoJS News, EchoJS News (2), HackerNews

Updated on September 18, 2022

Comments

  • Tim
    Tim almost 2 years

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

    tome3: error while loading shared libraries: libSDL-1.2.so.0: 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*
    /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
    /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4
    /usr/lib/x86_64-linux-gnu/libSDL.a
    /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0
    /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0.8.4
    /usr/lib/x86_64-linux-gnu/libSDLmain.a
    /usr/lib/x86_64-linux-gnu/libSDL.so
    

    I've tried to put /usr/lib/x86_64-linux-gnu/ into PATH and also copy libSDL-1.2.so.0 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.

  • Tim
    Tim over 10 years
    I have libSDL-1.2.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 entry. When you install lib using apt-get it run ldconfig automatically.
  • Tim
    Tim over 10 years
    It show libSDL-1.2.so.0 => not found; libSDL_net-1.2.so.0 => not found; libSDL_mixer-1.2.so.0 => not found but all other point to files in /usr/lib/i386-linux-gnu
  • Tim
    Tim over 10 years
    How to compile it using 64bit?
  • RJHunter
    RJHunter over 10 years
    That's specific to the game you compiled -- usually a ./configure script will auto-detect which platform (or will use your compiler's default). Check the game documentation.
  • RJHunter
    RJHunter over 10 years
    If the game is 32-bit only, you can just install the 32-bit versions of the SDL libraries, using something like apt-get install libsdl1.2:i386
  • Tim
    Tim over 10 years
    that file wasn't there, so I need to install sudo apt-get install libsdl1.2-dev:i386 libglu1-mesa-dev:i386 libglu-dev:i386 bump into this: bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1296474 then also install libsdl-mixer1.2-dev:i386 and libsdl-net1.2-dev:i386 to make it work.