我是 Linux 新手,但我真的很想学习它并将其用作我的主要开发平台。不过,我在安装项目中使用的库时遇到了麻烦。
每当我尝试安装 SFML 时sudo apt-get install libsfml-dev
都会出现错误:
The following packages have unmet dependencies:
libsfml-dev : Depends: libgl1-mesa-dev but it is not going to be installed or
libgl-dev
E: Unable to correct problems, you have held broken packages.
如果我尝试的话sudo apt-get install libgl1-mesa-dev
我会得到:
The following packages have unmet dependencies:
libgl1-mesa-dev : Depends: libgl1-mesa-glx (= 12.0.3-1ubuntu2) but 12.0.6-0ubuntu0.16.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.`
就像我说的,我是 Linux 新手,几乎不知道我在这里做什么。任何帮助都将不胜感激。
谢谢!
答案1
在任何安装之前和之后始终执行此操作是一种很好的做法,因此请update
运行:upgrades
sudo apt update
sudo apt full-upgrade