Ubuntu 20.04 和内核 5.13.0-051300-generic:如何安装标头和 libc6

Ubuntu 20.04 和内核 5.13.0-051300-generic:如何安装标头和 libc6

我最近在配备 Ubuntu 20.04 的 Tuxedo 笔记本电脑上将内核升级到版本5.13.0-051300-generic。我现在正在尝试安装标头linux-headers-5.13.0-051300-generic_5.13.0-051300.202106272333_amd64.deb。如果我尝试使用命令执行此操作sudo apt install ./linux-headers-5.13.0-051300-generic_5.13.0-051300.202106272333_amd64.deb,我会收到以下错误消息:

The following packages have unmet dependencies:
 linux-headers-5.13.0-051300-generic : Depends: libc6 (>= 2.33) but 2.31-0ubuntu9.3 is to be installed
E: Unable to correct problems, you have held broken packages.

然后我尝试libc6_2.33-0ubuntu5_amd64.deb使用相同的命令进行安装,但得到以下结果:

...
The following packages will be upgraded:
  libc6
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  libc-bin
1 upgraded, 0 newly installed, 68 to remove and 0 not upgraded.
Need to get 0 B/2,690 kB of archives.
After this operation, 2,034 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

我停下来了,因为我不知道我到底在做什么。我也尝试了命令sudo dpkg -i libc6_2.33-0ubuntu5_amd64.deb,得到了以下结果:

dpkg: regarding libc6_2.33-0ubuntu5_amd64.deb containing libc6:amd64:
 libc6:amd64 breaks fakeroot (<< 1.25.3-1.1ubuntu2~)
  fakeroot (version 1.24-1) is present and installed.

dpkg: error processing archive libc6_2.33-0ubuntu5_amd64.deb (--install):
 installing libc6:amd64 would break fakeroot, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 libc6_2.33-0ubuntu5_amd64.deb

然后我尝试libfakeroot使用该.deb文件进行升级(我也尝试使用此工具GDebi进行安装,但按钮变灰):如果我从终端使用检查该库的版本,我会得到但是如果我使用检查,我会得到:libc6Installapt-cache policy fakerootInstalled: 1.24-1sudo apt install ./libfakeroot_1.25.3-1.1_amd64.deb

Note, selecting 'libfakeroot' instead of './libfakeroot_1.25.3-1.1_amd64.deb'
libfakeroot is already the newest version (1.25.3-1.1).

我究竟做错了什么?


编辑1的结果uname -a; ls /boot; apt-cache policy linux-headers-5.13.0-051300-generic linux-image-generic libc6 libc-bin libfakeroot如下:

Linux lorenzo-InfinityBookS 5.13.0-051300-generic #202106272333 SMP Sun Jun 27 23:36:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
config-5.13.0-051300-generic  grub                              initrd.img-5.8.0-59-generic  System.map-5.13.0-051300-generic  vmlinuz-5.13.0-051300-generic
config-5.4.0-77-generic       initrd.img                        initrd.img.old               System.map-5.4.0-77-generic       vmlinuz-5.4.0-77-generic
config-5.8.0-55-generic       initrd.img-5.13.0-051300-generic  memtest86+.bin               System.map-5.8.0-55-generic       vmlinuz-5.8.0-55-generic
config-5.8.0-59-generic       initrd.img-5.4.0-77-generic       memtest86+.elf               System.map-5.8.0-59-generic       vmlinuz-5.8.0-59-generic
efi                           initrd.img-5.8.0-55-generic       memtest86+_multiboot.bin     vmlinuz                           vmlinuz.old
linux-headers-5.13.0-051300-generic:
  Installed: (none)
  Candidate: (none)
  Version table:
linux-image-generic:
  Installed: 5.4.0.77.80
  Candidate: 5.4.0.77.80
  Version table:
 *** 5.4.0.77.80 500
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     5.4.0.26.32 500
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6:
  Installed: 2.31-0ubuntu9.3
  Candidate: 2.31-0ubuntu9.3
  Version table:
 *** 2.31-0ubuntu9.3 100
        100 /var/lib/dpkg/status
     2.31-0ubuntu9.2 500
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
     2.31-0ubuntu9 500
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc-bin:
  Installed: 2.31-0ubuntu9.3
  Candidate: 2.31-0ubuntu9.3
  Version table:
 *** 2.31-0ubuntu9.3 100
        100 /var/lib/dpkg/status
     2.31-0ubuntu9.2 500
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
     2.31-0ubuntu9 500
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/archive.ubuntu.com/ubuntu focal/main amd64 Packages
libfakeroot:
  Installed: 1.25.3-1.1
  Candidate: 1.25.3-1.1
  Version table:
 *** 1.25.3-1.1 100
        100 /var/lib/dpkg/status
     1.24-1 500
        500 http://mirrors.tuxedocomputers.com/ubuntu/mirror/archive.ubuntu.com/ubuntu focal/main amd64 Packages

答案1

首先,我们需要将软件包从 Ubuntu 20.04 LTS 存储库恢复为其默认版本:

sudo apt-get install --reinstall libc6=2.31-0ubuntu9.2 libc-bin=2.31-0ubuntu9.2
sudo apt-get install --reinstall libfakeroot=1.24-1

然后,我们需要删除刚刚安装的 5.13 内核,因为它的头文件依赖于较新的 libc6,而 Ubuntu 20.04 LTS 没有这个库。

使用以下命令:

sudo apt-get purge linux-headers-5.13.0-051300 linux-image-unsigned-5.13.0-051300-generic linux-modules-5.13.0-051300-generic

关于 TP Link U300 的原始 USB 以太网问题,我看到它基于 Realtek RTL8153。此芯片至少由linux-firmware 包裹. 但是如果没有输出,就很难给出完整的指令journalctl -flsusblsusb -t

相关内容