I am trying to install the SDL2 development headers to compile a program that imports SDL2. Here is the output when I run the command $sudo apt-get install libsdl2-dev
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libsdl2-dev : Depends: libsdl2-2.0-0 (= 2.0.10+dfsg1-3) but 2.0.12+dfsg1-2 is to be installed
E: Unable to correct problems, you have held broken packages.
Aptitude and Synaptic both suggest downgrading SDL2 to resolve this. I am not comfortable with accepting this since SDL2 is used by other programs. Changing the version might break something else (for all I know.)
I suspect that this is somehow caused by me carelessly using the package manager in the past (it says "you have held broken packages",) so I'd like to actually understand the issue and the solution rather than blindly accepting whatever aptitude suggests.
Thanks
EDIT: My OS is Ubuntu 20.04.5 LTS
apt policy libsdl2-2.0-0 libsdl2-dev
so we can see what repos those versions are coming from – steeldriver Oct 01 '22 at 17:13