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发行版-之路教程

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值