Debian

Debian:由於軟體包損壞,無法安裝 qtcreator

  • June 1, 2019

我正在嘗試安裝 qtcreator 或任何其他 qt 開發包,但由於包損壞,它無法正常工作。然後我嘗試從 qt 網站手動安裝 qtcreator,但由於這個錯誤,我無法編譯任何東西cannot find -lGL

然後我嘗試安裝 libgl1-mesa-dev 並得到與安裝 qtcreator 時相同的錯誤:

> sudo apt-get install libgl1-mesa-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:
libgl1-mesa-dev : Depends: mesa-common-dev (= 13.0.6-1+b2) but it is not going to be installed
                  Depends: libdrm-dev (>= 2.4.69) but it is not going to be installed
                  Depends: libxcb-dri3-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

它可能與我的sources.list有關,我添加了這個:

deb http://ftp.fr.debian.org/debian testing main non-free contrib
deb-src http://ftp.fr.debian.org/debian testing main non-free contrib

我使用的是 debian 9.9 stable,我安裝了一些軟體包sudo apt-get -t testing install <package>

我破壞了我的系統嗎?有沒有辦法修復它或者我應該重新安裝它?

我破壞了我的系統嗎?

是的。

有沒有辦法修復它或者我應該重新安裝它?

是的,刪除測試源,然後按照 debian wiki 上的說明進行操作:系統降級如何從“測試”恢復到“穩定”-核心降級

qtcreator在 debian stretch 上使用,您可以通過以下方式安裝它:

apt install qtcreator 

引用自:https://unix.stackexchange.com/questions/522372