我无法更新我的 Ubuntu 22.04 服务器

我无法更新我的 Ubuntu 22.04 服务器

我明白了。

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-generic : Depends: linux-image-generic (= 5.15.0.97.92) but 5.15.0.94.91 is installed
                 Depends: linux-headers-generic (= 5.15.0.97.92) but 5.15.0.94.91 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

当我尝试跑步时apt --fix-broken install,我得到

E: Sub-process /usr/bin/dpkg returned an error code (1)
    linux-generic:
      Installed: 5.15.0.97.92
      Candidate: 5.15.0.97.92
      Version table:
     *** 5.15.0.97.92 500
          500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
            500 http://us.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
            100 /var/lib/dpkg/status
         5.15.0.25.27 500
            500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

The only thing I can think of is that I added Plex to my server.

     Errors were encountered while processing:
     /tmp/apt-dpkg-install-GEMHH4/0-linux-modules-5.15.0-97-generic_5.15.0-97.107_amd64.deb
     /tmp/apt-dpkg-install-GEMHH4/1-linux-image-5.15.0-97-generic_5.15.0-97.107_amd64.deb
     /tmp/apt-dpkg-install-GEMHH4/2-linux-modules-extra-5.15.0-97-generic_5.15.0-97.107_amd64.deb
     /tmp/apt-dpkg-install-GEMHH4/3-linux-image-generic_5.15.0.97.92_amd64.deb
     /tmp/apt-dpkg-install-GEMHH4/4-linux-headers-5.15.0-97_5.15.0-97.107_all.deb
     /tmp/apt-dpkg-install-GEMHH4/5-linux-headers-5.15.0-97-generic_5.15.0-97.107_amd64.deb
     /tmp/apt-dpkg-install-GEMHH4/6-linux-headers-generic_5.15.0.97.92_amd64.deb
    needrestart is being skipped since dpkg has failed
    E: Sub-process /usr/bin/dpkg returned an error code (1)

 

答案1

这是由于非树内核驱动程序与内核版本之间的版本冲突造成的。常见原因是 VirtualBox 和 Nvidia 驱动程序,而 Intel ARC 和 AMDGPU-PRO 的其他不再需要的驱动程序也可能导致这种情况。HWE 内核从 6.2 升级到 6.5 可能会造成一些问题。如果您不需要任何非树驱动程序,您可以删除它们的整个子系统,这将删除不需要的驱动程序,然后软件包将正常:

sudo apt purge dkms # Will remove DKMS and any drivers written for DKMS
sudo apt install -f
# Now, if necessary, reinstall any drivers you still need,
# and you will know which driver needs updating

相关内容