containerd.io
我在 Ubuntu 22.04 LTS 上遇到了一个奇怪的 apt 错误。我正尝试安装Kubernetes 演练containerd
(为什么包名称中包含句点?!和之间有什么区别containerd.io
?但我离题了)我可以使用找到该包,apt search
但却apt install
假装不知道它:
$ apt search containerd.io
Sorting... Done
Full Text Search... Done
containerd.io/jammy 1.6.26-1 amd64
An open and reliable container runtime
$ sudo apt install -y containerd.io
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
我已经正确安装了他们的 repo 密钥和记录:
$ ls -l /etc/apt/trusted.gpg.d/ | grep -v ubuntu
total 12
-rw-r--r-- 1 root root 3817 Dec 22 23:19 docker.asc
$ cat /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list
deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable
apt update
运行顺利:
Hit:1 https://download.docker.com/linux/ubuntu jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
49 packages can be upgraded. Run 'apt list --upgradable' to see them.
所以我的问题是:为什么能search
找到包裹却install
找不到呢?
答案1
VM 的架构错误,containerd.io
显然无法使用arm64
。