16.10 yakkety 尝试安装 libsdl2-dev 时出现损坏的软件包

16.10 yakkety 尝试安装 libsdl2-dev 时出现损坏的软件包

当我尝试安装时,libsdl2-dev出现以下信息:

The following packages have unmet dependencies.
 libsdl2-dev : Depends: libegl1-mesa-dev but it is not going to be installed
               Depends: libgl1-mesa-dev but it is not going to be installed
               Depends: libgles2-mesa-dev but it is not going to be installed
               Depends: libglu1-mesa-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我从 xenial 升级了全新安装,并遇到了这些问题。

我按照惯例进行了apt-get dist-upgrade清理,但没有成功。当我开始添加提到的其他软件包时,似乎陷入了无休止地添加要安装的额外软件包的困境。

下面是根据要求的输出 cd /etc/apt&&find -name \*list -exec egrep -vH "^#|^$" {} \; ,我必须通过http://从输出中删除来进行修改,因为不允许超过 2 个链接。

./sources.list:deb gb.archive.ubuntu.com/ubuntu/ yakkety main restricted
./sources.list:deb-src gb.archive.ubuntu.com/ubuntu/ yakkety main multiverse restricted universe #Added by software-properties
./sources.list:deb gb.archive.ubuntu.com/ubuntu/ yakkety-updates main restricted
./sources.list:deb-src gb.archive.ubuntu.com/ubuntu/ yakkety-updates main multiverse restricted universe #Added by software-properties
./sources.list:deb gb.archive.ubuntu.com/ubuntu/ yakkety universe
./sources.list:deb gb.archive.ubuntu.com/ubuntu/ yakkety-updates universe
./sources.list:deb gb.archive.ubuntu.com/ubuntu/ yakkety multiverse
./sources.list:deb http://gb.archive.ubuntu.com/ubuntu/ yakkety-updates multiverse
./sources.list:deb gb.archive.ubuntu.com/ubuntu/ yakkety-backports main restricted universe multiverse
./sources.list:deb-src gb.archive.ubuntu.com/ubuntu/ yakkety-backports main restricted universe multiverse #Added by software-properties
./sources.list:deb security.ubuntu.com/ubuntu yakkety-security main restricted
./sources.list:deb-src security.ubuntu.com/ubuntu yakkety-security main multiverse restricted universe #Added by software-properties
./sources.list:deb security.ubuntu.com/ubuntu yakkety-security universe
./sources.list:deb security.ubuntu.com/ubuntu yakkety-security multiverse
./sources.list.d/spotify.list:deb repository.spotify.com stable non-free
./sources.list.d/graphics-drivers-ubuntu-ppa-yakkety.list:deb ppa.launchpad.net/graphics-drivers/ppa/ubuntu yakkety main
./sources.list.d/graphics-drivers-ubuntu-ppa-yakkety.list:deb-src ppa.launchpad.net/graphics-drivers/ppa/ubuntu yakkety main

答案1

首先清理并更新你的存储库:

$ apt-get clean
$ sudo dpkg --configure -a
$ sudo apt-get -f install 
$ sudo apt-get update

然后彻底删除问题应用程序。

$ sudo apt remove --purge libsdl2-dev

清除应用程序后,请正常重新安装。如果失败,请执行更强力的删除:

$ sudo dpkg --remove --force-remove-reinstreq libsdl2-dev

完成后应充分清除冲突并允许其正确安装。

相关内容