如何解決此錯誤:軟體包具有未滿足的依賴項:linux-image-oem-20.04b:取決於?

如何解決此錯誤:軟體包具有未滿足的依賴項:linux-image-oem-20.04b:取決於?

我收到這個錯誤

 The following packages have unmet dependencies:
  linux-image-oem-20.04b : Depends:
 linux-image-5.10.0-1049-oem but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我已經嘗試了幾乎所有的方法,但它不允許我安裝、刪除或更新任何東西。

 dpkg: error processing archive
 linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb (--install): 
 unable to open '/boot/vmlinuz-5.10.0-1049-oem.dpkg-new': Operation not
 permitted Errors were encountered while processing: 

 linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb

我也嘗試更新整個系統,但它給了我這個錯誤

 Transaction failed: The package system is broken  The following
 packages have unmet dependencies: linux-image-oem-20.04b: Depends:
 linux-image-5.10.0-1049-oem but it is not installed

嘗試使用以下命令安裝 OEM 核心:

sudo apt install linux-image-5.10.0-1049-oem

它給出了這個錯誤:

Preparing to unpack .../linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb ...
Unpacking linux-image-5.10.0-1049-oem (5.10.0-1049.51) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb (--unpack):
 unable to open '/boot/vmlinuz-5.10.0-1049-oem.dpkg-new': Operation not permitte
d
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

該錯誤是由於防毒實用程式不允許apt存取該/boot目錄造成的。停用您正在使用的任何防毒服務。

例如,如果您使用的是 MacCaffe,請執行以下命令來修復它(這些命令將刪除防毒實用程式):

sudo dpkg --purge mfedx 
sudo dpkg --purge mcafeetp 
sudo dpkg --purge mcafeeespaac 
sudo dpkg --purge mcafeeespfileaccess 
Sudo dpkg --purge mcafeeesp 
sudo dpkg --purge mcafeert 
sudo dpkg --purge mfecma 
sudo dpkg --purge mfert

相關內容