-1

I want use SDL2 in my project. For that I need lib and include SDL2 files. I was trying to install SDL2 with

apt-get install libsdl2-dev

but get an errors:

The following packages have unmet dependencies:
 libpulse-dev : Depends: libpulse0 (= 1:14.2-1ubuntu1) but 1:14.2-1ubuntu1.1 is to be installed
                Depends: libpulse-mainloop-glib0 (= 1:14.2-1ubuntu1) but 1:14.2-1ubuntu1.1 is to be installed
E: Unable to correct problems, you have held broken packages.

How I can fix it?

Ubuntu Description: Ubuntu 21.04 Release: 21.04 Codename: hirsute

mejay48
  • 7
  • 2
  • What Ubuntu version? – Liso Oct 20 '21 at 13:10
  • No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.04 Release: 21.04 Codename: hirsute – mejay48 Oct 20 '21 at 13:24
  • In my question, I wrote that I want to install which command I do it and gave an error log. Please tell me what exactly is not clear to you. – mejay48 Oct 20 '21 at 13:54
  • @mejay48 Try this `sudo sed -i.bak 's/\(^deb.*-updates.*\)/#\1/' /etc/apt/sources.list && sudo apt install libsdl2-dev`. – Liso Oct 20 '21 at 13:58
  • It seems updates channel prompt you to install `1:14.2-1ubuntu1.1` version, hence why i try disabling it. I could be wrong though, you can try `apt-get -s install libsdl2-dev` to simulate the process before actually running them. – Liso Oct 20 '21 at 14:01
  • Thanks for trying, but it does not help me. with your command line I got exacly same errors. – mejay48 Oct 20 '21 at 14:20
  • Minor version errors like this *usually* occur because the package catalog needs to be updated (`sudo apt update`) – steeldriver Oct 20 '21 at 14:34
  • unfortunately no, apt update does not fix issue – mejay48 Oct 20 '21 at 14:37
  • Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories) – N0rbert Oct 20 '21 at 21:17
  • Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages) – karel Oct 21 '21 at 06:18

1 Answers1

1

So, I can't find a reason of errors of sdl2 package, but manual compilation from source helps me install it (./configure, sudo make install).

mejay48
  • 7
  • 2