sudo apt-get install gcc-9-base libgcc-9-dev libc6-dev

sudo apt-get install gcc-9-base libgcc-9-dev libc6-dev

我無法安裝任何東西,因為這個問題

當我嘗試 --fix-broken install 時

終端顯示:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 clang-6.0 : Depends: libgcc-8-dev but it is not installed
 clang-7 : Depends: libgcc-8-dev but it is not installed
 gcc-8 : Depends: libgcc-8-dev (= 8.3.0-6) but it is not installed
 libobjc-8-dev : Depends: libgcc-8-dev (= 8.3.0-6) but it is not installed
 libstdc++-8-dev : Depends: libgcc-8-dev (= 8.3.0-6) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

請幫幫我,謝謝

答案1

您看到此錯誤是因為您持有一些未滿足的依賴項。打開終端機視窗並執行以下命令

sudo apt-get update
sudo apt-get install -f
sudo apt autoremove
sudo apt autoclean
sudo apt-get update; sudo apt-get upgrade

然後您可以透過執行命令繼續安裝軟體包sudo apt-get install gcc

相關內容