$ sudoapt-getinstall libsdl2-dev
Reading package lists... Done
Building dependency tree... Done
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:
libpulse-dev : Depends: libpulse0 (=1:15.99.1+dfsg1-1ubuntu1) but 1:15.99.1+dfsg1-1ubuntu2.1 is to be installed
Depends: libpulse-mainloop-glib0 (=1:15.99.1+dfsg1-1ubuntu1) but 1:15.99.1+dfsg1-1ubuntu2.1 is to be installed
libudev-dev : Depends: libudev1 (=249.11-0ubuntu3.7) but 249.11-0ubuntu3.11 is to be installed
E: Unable to correct problems, you have held broken packages.
2. 分步手动解决方案
2.1 安装 aptitude 工具
# 先安装工具 aptitude
$ sudoaptitudeinstallaptitude
2.2 使用 aptitude 工具手动解决部分依赖关系
# 使用aptitude再次执行安装, 先安装上面依赖的一个库
$ sudoaptitudeinstall libudev-dev
The following NEW packages will be installed:
libudev-dev{
b}0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.7 kB of archives. After unpacking 270 kB will be used.
The following packages have unmet dependencies:
libudev-dev : Depends: libudev1 (=249.11-0ubuntu3.7) but 249.11-0ubuntu3.11 is installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libudev-dev [Not Installed]# 注意下面这行, 选择 `n` 否决上面的 不安装方案, 让工具提示其他方案;
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Remove the following packages:
1) udev [249.11-0ubuntu3.11 (now)]
Install the following packages:
2) gcc-12-base:i386 [12.3.0-1ubuntu1~22.04 (jammy-security)]3) krb5-locales [1.19.2-2ubuntu0.3 (jammy-security)]4) libacl1:i386 [2.3.1-1 (jammy)]5) libblkid1:i386 [2.37.2-4ubuntu3 (jammy)]6) libc6:i386 [2.35-0ubuntu3.6 (jammy-security)]7) libcap2:i386 [1:2.44-1ubuntu0.22.04.1 (jammy-security)]8) libcom-err2:i386 [1.46.5-2ubuntu1.1 (jammy-security)]9) libcrypt1:i386 [1:4.4.27-1 (jammy)]10) libgcc-s1:i386 [12.3.0-1ubuntu1~22.04 (jammy-security)]11) libgssapi-krb5-2:i386 [1.19.2-2ubuntu0.3 (<