-1

I'm having issues trying to install sdl to run some applications. I used a string given by the FAQ of the app I was trying to run, but this is the result.

devlin@DiningRoomHP:~$ sudo apt-get install libsdl1.2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libsdl1.2-dev
E: Couldn't find any package by regex 'libsdl1.2-dev'

Anyone able to help with this?

Kyle Ravenborn
  • 1
  • 1
  • 1
  • 1

4 Answers4

0

First update :

 sudo apt-get update

Second: check which sdl versions are available:

sudo apt-cache search libsdl

In my ubuntu versions (wheezey, stretch,tara ) I see libsdl1.2-dev, libsdl2-dev are available.

0

This error is often caused by not updating the latest info

Try

sudo apt update

then check the spelling again

0

This worked for me:

sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libpulse-dev libxt-dev

And I compiled my file that uses SDL_ttf and SDL_gfx this way:

gcc main.c -lm -I/usr/include/SDL -lSDL -lSDL_ttf -lSDL_gfx

-lm is to include math library. -I/usr/include/SDL to include header files of SDL. -lSDL -lSDL_ttf -lSDL_gfx some of the libraries I used from SDL in my project.

Note: main.c should be repalced with <yourfilename>.c

-1

Try downloading the .deb from here and installing it using

sudo dpkg -i [package].deb
Mitch
  • 4,697