Ubuntu 16.04 無法執行“sudo apt update”

Ubuntu 16.04 無法執行“sudo apt update”

我有伺服器正在運行

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:        16.04
Codename:       xenial

我正在嘗試使用此命令升級系統。當前用戶不是

sudo apt-get update
sudo apt-get upgrade

但它向我顯示了這樣的錯誤

linux-image-generic-hwe-16.04 :依賴:linux-image-4.15.0-33-generic 但未安裝推薦:Thermald 但未安裝

linux-modules-extra-4.15.0-30-generic :取決於: linux-image-4.15.0-30-generic 但未安裝或 linux-image-unsigned-4.15.0-30-generic 但未安裝已安裝

我嘗試獨立安裝這個軟體包,但它沒有解決我的問題

我也嘗試過使用

sudo apt-get -f install

沒有解決方案。

已編輯

sudo apt install linux-image-4.15.0-33-generic

Reading package lists... Done
Building dependency tree       
Reading state information... Done

You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:



linux-image-4.15.0-33-generic : Depends: linux-modules-4.15.0-33-generic but it is not going to be installed



linux-image-generic-hwe-16.04 : Depends: linux-image-4.15.0-34-generic but it is not going to be installed


 Recommends: thermald but it is not going to be installed



linux-modules-extra-4.15.0-34-generic : Depends: linux-image-4.15.0-34-generic but it is not going to be installed or
                                                  linux-image-unsigned-4.15.0-34-generic but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我用谷歌搜尋但找不到答案,可能是我搜尋錯誤。

我現在能做什麼?

答案1

apt-get upgrade在 Ubuntu 10.04 上也遇到了類似的問題。然後我了解到它apt-get dist-upgrade更擅長處理依賴關係。從那時起我就一直使用它apt-get dist-upgrade,它在 10.04、12.04、14.04 和 16.04 上對我有用。

答案2

嘗試資質。我發現即使你拒絕第一個解決方案,它也會繼續嘗試解決方案。

aptitude full-upgrade

刪除核心可能會使您的系統無法啟動。確保有一個恢復計劃,例如重建盒子或啟動救援環境。

相關內容