Ubuntu 22.04 failed to install libsdl2-dev

os: ubuntu 22.04

APT source list:

occupymars2025@Lenovo:~$ cat /etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
occupymars2025@Lenovo:~$ 
occupymars2025@Lenovo:~$ sudo apt-get install 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:
 libsdl2-dev : Depends: libdbus-1-dev but it is not going to be installed
               Depends: libibus-1.0-dev but it is not going to be installed
               Depends: libpulse-dev but it is not going to be installed
               Depends: libsdl2-2.0-0 (= 2.0.20+dfsg-2build1) but 2.0.20+dfsg-2ubuntu1.22.04.1 is to be installed
               Depends: libudev-dev but it is not going to be installed
               Depends: libwayland-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Solution:  

apt - E: Unable to correct problems, you have held broken packages - Ask Ubuntu

sudo aptitude install myNewPackage

aptitude  is a high-level interface to the package manager and more intelligent than apt, it can provide several solutions to help you solve your problem. If you are not satisfied with one solution , you can say no, then switch to another solution.

occupymars2025@Lenovo:~$ sudo apt search libsdl2
[sudo] password for occupymars2025: 
Sorting... Done
Full Text Search... Done
libsdl2-2.0-0/jammy,now 2.0.20+dfsg-2build1 amd64 [installed,automatic]
  Simple DirectMedia Layer

libsdl2-dev/jammy,now 2.0.20+dfsg-2build1 amd64 [installed]
  Simple DirectMedia Layer development files

libsdl2-doc/jammy,jammy 2.0.20+dfsg-2build1 all
  Reference manual for libsdl2

libsdl2-gfx-1.0-0/jammy 1.0.4+dfsg-4 amd64
  drawing and graphical effects extension for SDL2

libsdl2-gfx-dev/jammy 1.0.4+dfsg-4 amd64
  development files for SDL2_gfx

libsdl2-gfx-doc/jammy,jammy 1.0.4+dfsg-4 all
  documentation files for SDL2_gfx

libsdl2-image-2.0-0/jammy 2.0.5+dfsg1-3build1 amd64
  Image loading library for Simple DirectMedia Layer 2, libraries

libsdl2-image-dev/jammy 2.0.5+dfsg1-3build1 amd64
  Image loading library for Simple DirectMedia Layer 2, development files

libsdl2-mixer-2.0-0/jammy 2.0.4+dfsg1-4build1 amd64
  Mixer library for Simple DirectMedia Layer 2, libraries

libsdl2-mixer-dev/jammy 2.0.4+dfsg1-4build1 amd64
  Mixer library for Simple DirectMedia Layer 2, development files

libsdl2-net-2.0-0/jammy 2.0.1+dfsg1-7 amd64
  Network library for Simple DirectMedia Layer 2, libraries

libsdl2-net-dev/jammy 2.0.1+dfsg1-7 amd64
  Network library for Simple DirectMedia Layer 2, development files

libsdl2-ttf-2.0-0/jammy 2.0.18+dfsg-2 amd64
  TrueType Font library for Simple DirectMedia Layer 2, libraries

libsdl2-ttf-dev/jammy 2.0.18+dfsg-2 amd64
  TrueType Font library for Simple DirectMedia Layer 2, development files

occupymars2025@Lenovo:~$ 

Simple DirectMedia Layer - Homepage

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值