Err*_*404 6 package-management dependencies kernel linux-headers
我正在使用 Ubuntu 21.10 impish indri。
对于某些特定的硬件支持,建议我升级到内核 5.16(主线)。我尝试手动安装.deb文件并使用dpkg -i. 但是,我遇到了依赖性问题:
The following packages have unmet dependencies:
linux-headers-5.16.0-051600-generic : Depends: libssl3 (>= 3.0.0~~alpha1) but it is not installable
Run Code Online (Sandbox Code Playgroud)
我运行sudo apt -f install它,它建议删除 5.16 内核包。所以,我暂时删除了它们。
如何在 Ubuntu 21.10 impish indri上安装内核 5.16 ?我已启用所有存储库,无需额外的 PPA。
TL;DR:您可以从 22.04 存储库手动安装该软件包。
Ubuntu 主线内核 5.15.7+ 和 5.16 将要求从 提高libssl1.1 (>= 1.1.0)到libssl3 (>= 3.0.0~~alpha1). 但是,该软件包libssl3不适用于 Ubuntu 21.10 impish indri。。它仅适用于尚未发布的Ubuntu 22.04 jammy jellyfish 。
libssl3进一步取决于libc6>=2.34并且在 21.10 存储库中可用debconf。
因此,您可以libssl3从 Jammy Jellyfish 存储库手动安装。除非您对系统做了一些非常奇怪的事情,否则这样做不会有任何问题。
要在 Ubuntu 21.10 上安装libssl3,请运行以下命令:
sudo apt update
sudo apt install libc6 debconf
wget http://mirrors.kernel.org/ubuntu/pool/main/o/openssl/libssl3_3.0.1-0ubuntu1_amd64.deb
sudo dpkg -i libssl3_3.0.1-0ubuntu1_amd64.deb
sudo apt -f install
Run Code Online (Sandbox Code Playgroud)
现在,您可以在 Ubuntu 21.10 上安装内核 5.16,不会出现任何问题。
请记住,主线内核尚未通过其 Ubuntu 版本进行测试。这意味着您正在进行测试。你可能会遇到意想不到的事情。Ubuntu 更喜欢稳定的 LTS 内核而不是不稳定的主线内核。
您可以使用以下命令来安装未签名的内核 5.16(除非您使用安全启动,否则不必担心未签名的问题):
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.16/amd64/linux-headers-5.16.0-051600_5.16.0-051600.202201092355_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.16/amd64/linux-headers-5.16.0-051600-generic_5.16.0-051600.202201092355_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.16/amd64/linux-image-unsigned-5.16.0-051600-generic_5.16.0-051600.202201092355_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.16/amd64/linux-modules-5.16.0-051600-generic_5.16.0-051600.202201092355_amd64.deb
sudo dpkg -i linux*.deb
sudo apt -f install
Run Code Online (Sandbox Code Playgroud)
手动安装的另一种方法libssl3是固定该包。社区帮助 Wiki中描述了固定。
您需要编辑 3 个文件。sudo touch <filename>如果它们尚不存在,请先创建它们。这可确保权限和所有权设置正确。
/etc/apt/apt.conf.d/01ubuntu
APT::Default-Release "impish";
Run Code Online (Sandbox Code Playgroud)
这将成为impish安装软件包的默认 Ubuntu 版本。
/etc/apt/sources.list.d/ubuntu-jammy.list
deb http://mirror.example.com/ubuntu/ jammy main
Run Code Online (Sandbox Code Playgroud)
这会添加jammy(22.04) 存储库。Ubuntu 实际上并没有默认使用它,因为APT::Default-Release. 我重复一遍,我再怎么强调也不为过:Ubuntu 永远不会从这个(或任何其他)jammy存储库安装任何软件包,除非满足以下条件之一:
apt安装仅存在于jammy存储库中的特定版本(这假设您知道自己在做什么!)/etc/apt/preferences.d/libssl3
Package: libssl3
Pin: release n=jammy
Pin-Priority: 900
Run Code Online (Sandbox Code Playgroud)
libssl3这为来自存储库的包提供了更高的优先级jammy,并且仅该包。所以对于所有的包来说,impish是默认的,并且libssl3有一个例外。
现在运行sudo apt update。在编辑完所有 3 个文件之前请勿运行它!
要查看将要安装哪些软件包,请运行apt-cache policy:
$ apt-cache policy libssl3
libssl3:
Installed: (none)
Candidate: 3.0.1-0ubuntu1
Version table:
3.0.1-0ubuntu1 900
500 http://mirror.unix-solutions.be/ubuntu jammy/main amd64 Packages
100 /var/lib/dpkg/status
Run Code Online (Sandbox Code Playgroud)
libssl3正如您所看到的,存储库中只有一个 , 的安装候选jammy。
$ apt-cache policy linux-image-generic
linux-image-generic:
Installed: 5.13.0.35.44
Candidate: 5.13.0.35.44
Version table:
5.15.0.22.24 500
500 http://mirror.unix-solutions.be/ubuntu jammy/main amd64 Packages
*** 5.13.0.35.44 990
990 http://mirror.unix-solutions.be/ubuntu impish-updates/main amd64 Packages
990 http://mirror.unix-solutions.be/ubuntu impish-security/main amd64 Packages
100 /var/lib/dpkg/status
5.13.0.19.30 990
990 http://mirror.unix-solutions.be/ubuntu impish/main amd64 Packages
Run Code Online (Sandbox Code Playgroud)
该套件linux-image-generic可用:
5.15.0.22.24, 在jammy/main, 优先5005.13.0.35.44、 和impish-updates/main、impish-security/main优先9905.13.0.19.30(发布时 USB 或 DVD 安装程序中的原始版本), in impish/main,优先级990。指示***将安装哪个版本。
在我的特定用例中,我必须安装许多内核:5.13, 5.14, 5.15, 5.16, 5.17。我目前安装了 35 个内核:
$ ls -1 /boot/initrd* | wc --lines
35
Run Code Online (Sandbox Code Playgroud)
为了演示libssl在需要时自动安装为依赖项,我安装了 Ubuntu 内核5.15.0-22-generic,它也来自 Jammy:
$ sudo apt install linux-{image,headers,modules,modules-extra}-5.15.0-22-generic
Reading package lists... Done
Building dependency tree... Donesudo apt install linux-{image,headers,modules,modules-extra}-5.15.0-22-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libssl3 linux-headers-5.15.0-22
Suggested packages:
fdutils linux-doc | linux-source-5.15.0
The following NEW packages will be installed:
libssl3 linux-headers-5.15.0-22 linux-headers-5.15.0-22-generic linux-image-5.15.0-22-generic linux-modules-5.15.0-22-generic linux-modules-extra-5.15.0-22-generic
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 103 MB of archives.
After this operation, 565 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Reading state information... Done
The following additional packages will be installed:
libssl3 linux-headers-5.15.0-22
Suggested packages:
fdutils linux-doc | linux-source-5.15.0
The following NEW packages will be installed:
libssl3 linux-headers-5.15.0-22 linux-headers-5.15.0-22-generic linux-image-5.15.0-22-generic linux-modules-5.15.0-22-generic linux-modules-extra-5.15.0-22-generic
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 103 MB of archives.
After this operation, 565 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Run Code Online (Sandbox Code Playgroud)
如您所见,该包libssl3会自动作为依赖项拉入。
如果不需要 5.15 内核,则可以libssl3直接安装:
$ sudo apt install --yes libssl3
Run Code Online (Sandbox Code Playgroud)
尽管如此,人们仍然没有安装主线内核,并且我强烈同意有关永久添加内核 PPA 的所有警告。作为替代方案,您可以使用Ubuntu Mainline Kernel Installer (UMKI),这是一个用于安装最新主线内核的图形工具。它从主线内核 PPA 获取列表,而实际上不需要将 PPA 添加到源中。.deb您可以从 GitHub 发布页面安装该包,或者执行以下操作:
sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline
Run Code Online (Sandbox Code Playgroud)
如果您不喜欢(或不能使用)GUI,它还有一个 CLI:
$ mainline
mainline 1.0.15
Distribution: Ubuntu 21.10
Architecture: amd64
Running kernel: 5.13.0-22-generic
mainline 1.0.15 - Ubuntu Mainline Kernel Installer
Syntax: mainline <command> [options]
Commands:
--check Check for kernel updates
--notify Check for kernel updates and notify current user
--list List all available mainline kernels
--list-installed List installed kernels
--install-latest Install latest mainline kernel
--install-point Install latest point update for current series
--install <name> Install specified mainline kernel(1)
--uninstall <name> Uninstall specified kernel(2)
--uninstall-old Uninstall kernels older than the running kernel
--download <name> Download specified kernels(2)
--clean-cache Remove files from application cache
Options:
--include-unstable Include unstable and RC releases
--hide-unstable Hide unstable and RC releases
--debug Enable verbose debugging output
--yes Assume Yes for all prompts (non-interactive mode)
--user Override user
Notes:
(1) A version string taken from the output of --list
(2) One or more version strings (comma-separated) taken from the output of --list
Run Code Online (Sandbox Code Playgroud)
例如,sudo mainline --install-latest --include-unstable当前安装主线内核5.17.0-rc7。
到目前为止,我已经使用 UMKI 安装了 12 个不同的内核,我对此非常满意。
这种方法是安全的,只要你严格按照上面的步骤进行安装即可libssl。不相信它?很公平。在虚拟机等安全环境中亲自尝试一下。还是不相信?/etc/apt/sources.list.d/ubuntu-jammy.list安装后立即删除(或注释掉)该文件libssl,然后sudo apt update再次运行。
还有一件事需要完成:如果您决定从 升级impish到,那么您只需在开始升级之前jammy删除(或注释) 3 个文件/etc/apt/apt.conf.d/01ubuntu, /etc/apt/sources.list.d/ubuntu-jammy.list。/etc/apt/preferences.d/libssl3第一个是必须的,另外两个是一些家务,因为你不再需要它们。
Ubuntu 主线内核安装程序 GitHub 问题 127中引用了该答案,并构成了有关安装 libssl 的 wiki 页面的基础。您也可以在我的博客上阅读相关内容。
| 归档时间: |
|
| 查看次数: |
7751 次 |
| 最近记录: |