关于Ubuntu(Debian)软件源报错问题及解决

Posted givenchy_yzl

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于Ubuntu(Debian)软件源报错问题及解决相关的知识,希望对你有一定的参考价值。

问题:在执行sudo apt-get update时出现以下报错,查询得知是因为换源以后,新的下载源没有公钥

W: GPG error: http://mirrors.aliyun.com/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9EFBF77E11517
W: The repository 'http://mirrors.aliyun.com/debian buster 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.

查了网上的帖子得知运行以下命令即可

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  648ACFD622F3D138 0E98404D386FA1D9 #此处的两个密钥,根据上面的提示输入

执行上述命令我报了另一个错如下:

gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/run/user/0/gnupg/d.69bou1oox7kpsyamgp6b3ba7/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

说明缺少软件,那就安装依赖,在执行添加公钥的命令

sudo apt-get install software-properties-common dirmngr
linaro@bm1682:/data/ZhouShanV4_se3_so_828$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  648ACFD622F3D138 0E98404D386FA1D9  DCC9EFBF77E11517 112695A0E562B32A 54404762BBB6E853 

若出现以下,代码即为成功
Executing: /tmp/apt-key-gpghome.4xwojFTNfF/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 0E98404D386FA1D9 DCC9EFBF77E11517 112695A0E562B32A 54404762BBB6E853
gpg: key A48449044AAD5C5D: public key “Debian Security Archive Automatic Signing Key (11/bullseye) ftpmaster@debian.org” imported
gpg: key 4DFAB270CAA96DFA: public key “Debian Security Archive Automatic Signing Key (10/buster) ftpmaster@debian.org” imported
gpg: key DCC9EFBF77E11517: public key “Debian Stable Release Key (10/buster) debian-release@lists.debian.org” imported
gpg: key 73A4F27B8DD47936: public key “Debian Archive Automatic Signing Key (11/bullseye) ftpmaster@debian.org” imported
gpg: key DC30D7C23CBBABEE: public key “Debian Archive Automatic Signing Key (10/buster) ftpmaster@debian.org” imported
gpg: Total number processed: 5
gpg: imported: 5

再执行 sudo apt-get update 就可以了

以上是关于关于Ubuntu(Debian)软件源报错问题及解决的主要内容,如果未能解决你的问题,请参考以下文章

关于Ubuntu(Debian)软件源报错问题及解决

关于Ubuntu(Debian)软件源报错问题及解决

ubuntu更新源报错

ubuntu更新源报错Certificate verification failed: The certificate is NOT trusted.

linux -小记 问题:linux 安装epel扩展源报错

centos 系统服务器yum源报错 “No module named yum”