11
dpkg -l | grep sdl

This command gives me the following detail:

ii  libsdl1.2debian:i386                                        1.2.15-8ubuntu1.1                                   i386         Simple DirectMedia Layer

I don't know whether SDL 1.2 is being installed on my system or not? Also, do I need to install sdl image, mixer, ttf etc etc? How to install them?

4 Answers 4

13

For installing it:

sudo apt-get install libsdl2-2.0

and for installing everything necessary to build programs that use SDL:

sudo apt-get install libsdl2-dev
1
  • How do I install dbg files? Mine can't locate dbg packages. And when apt-cache search libsdl | grep dbg, nothing appears!
    – user857469
    Sep 13, 2018 at 13:12
10

You can search for all available instances of libsld1.2 with something like the following:

andrew@corinth:~$ apt-cache search ^libsdl | grep 1.2
libsdl1.2-dbg - Simple DirectMedia Layer debug files
libsdl1.2-dev - Simple DirectMedia Layer development files
libsdl1.2debian - Simple DirectMedia Layer
libsdl-image1.2-dbg - Image loading library for Simple DirectMedia Layer 1.2, debugging
libsdl-mixer1.2-dbg - Mixer library for Simple DirectMedia Layer 1.2, debugging
libsdl-net1.2-dbg - Network library for Simple DirectMedia Layer 1.2, debugging
libsdl-gfx1.2-4 - drawing and graphical effects extension for SDL
libsdl-gfx1.2-dev - development files for SDL_gfx
libsdl-gfx1.2-doc - documentation files for SDL_gfx
libsdl-image1.2 - Image loading library for Simple DirectMedia Layer 1.2, libraries
libsdl-image1.2-dev - Image loading library for Simple DirectMedia Layer 1.2, development files
libsdl-mixer1.2 - Mixer library for Simple DirectMedia Layer 1.2, libraries
libsdl-mixer1.2-dev - Mixer library for Simple DirectMedia Layer 1.2, development files
libsdl-net1.2 - Network library for Simple DirectMedia Layer 1.2, libraries
libsdl-net1.2-dev - Network library for Simple DirectMedia Layer 1.2, development files
libsdl-sound1.2 - Sound library for Simple DirectMedia Layer 1.2, libraries
libsdl-sound1.2-dev - Sound library for Simple DirectMedia Layer 1.2, development files
libsdl-ttf2.0-0 - TrueType Font library for Simple DirectMedia Layer 1.2, libraries
libsdl-ttf2.0-dev - TrueType Font library for Simple DirectMedia Layer 1.2, development files
andrew@corinth:~$ 

and then simply install all of the resulting files with something like the following:

sudo apt-get install libsdl1.2debian libsdl-gfx1.2-5 \
libsdl-gfx1.2-dev libsdl-gfx1.2-doc libsdl-image1.2 \
libsdl-image1.2-dbg libsdl-image1.2-dev libsdl-mixer1.2 \
libsdl-mixer1.2-dbg libsdl-mixer1.2-dev libsdl-net1.2 \
libsdl-net1.2-dbg libsdl-net1.2-dev libsdl-sound1.2 \
libsdl-sound1.2-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev

You can easily leave some out such as the .dbg files which are simply debugging extras and you will not need the -dev files unless you are compiling. Some will also be dependencies of the others as well and will be automagically installed with installation of one of these files...

2
  • 2
    oh so : sudo apt install libsdl1.2debian libsdl-gfx1.2-5 libsdl-gfx1.2-dev libsdl-gfx1.2-doc libsdl-image1.2 libsdl-image1.2-dbg libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dbg libsdl-mixer1.2-dev libsdl-net1.2 libsdl-net1.2-dbg libsdl-net1.2-dev libsdl-sound1.2 libsdl-sound1.2-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev ok thanks!
    – tatsu
    May 28, 2017 at 11:56
  • the shorter answer is better
    – Void Star
    Nov 20, 2020 at 4:16
2

You can do this:

sudo apt-get install libsdl1.2-dbg

Or download the SDL source code to compile and install:

Download SDL

tar xvf SDL-1.2.tar.gz
cd SDL-1.2
./configure
make
sudo make install
2
  • 1
    Will it install sdl image, mixer, ttf etc also?
    – dlpsankhla
    Jun 13, 2016 at 4:48
  • @dlpsankhla I think not. Jul 18, 2017 at 5:03
0

If Shahin Bakhshaei's answer (datetime stamp: 2017-04-28T08:43) did NOT yet also solve the problem in your case, please verify using these Terminal Commands:

sudo apt-get install aptitude
sudo aptitude install libsdl2-dev

Reminder: We use libsdl2-dev when building software applications that use SDL. This is instead of only executing application programs.

Thank you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .