server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

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小时终于搞定了。

扩展:

1.LINUX发行版-之路教程

相关文章

显卡天梯图2024最新版,显卡是电脑进行图形处理的重要设备,...
初始化电脑时出现问题怎么办,可以使用win系统的安装介质,连...
todesk远程开机怎么设置,两台电脑要在同一局域网内,然后需...
油猴谷歌插件怎么安装,可以通过谷歌应用商店进行安装,需要...
虚拟内存这个名词想必很多人都听说过,我们在使用电脑的时候...