docker换源以后,就报了这个错。
换源前:
deb http://deb.debian.org/debian stretch main contrib non-free
换源后:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
解决方法:把软件源里的https改成http
vi /etc/apt/sources.list
apt-get update
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
报错1:
W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93D
W: The repository 'http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@syzkaller:~# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 871920D1991BC93D
解决1:
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 871920D1991BC93C(上面显示的公钥)
报错2:
failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
解决2:
sudo apt-get update -y
sudo apt-get install -y dirmngr
折腾2小时终于搞定了。
扩展: