【Ubuntu升级报错】“the following signatures couldn’t be verified because the public key is not available”

这篇具有很好参考价值的文章主要介绍了【Ubuntu升级报错】“the following signatures couldn’t be verified because the public key is not available”。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

报错界面

在ubuntu中运行apt-get update时,有时会出现如下报错

ubuntu@ubuntu-virtual-machine:~$ sudo apt update
[sudo] password for ubuntu: 
Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
Hit:2 http://packages.microsoft.com/repos/code stable InRelease                
Err:1 http://dl.google.com/linux/chrome/deb stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
Hit:3 http://id.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://id.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:5 http://id.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Hit:7 http://packages.ros.org/ros/ubuntu bionic InRelease                      
Reading package lists... Done                        
Building dependency tree       
Reading state information... Done
468 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
W: Some index files failed to download. They have been ignored, or old ones used instead.

如果不去解决,无法继续进行后续的升级操作

ubuntu@ubuntu-virtual-machine:~$ sudo apt upgrade
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

这是由apt包系统的安全机制引起的问题,有时系统无法包含所有的key。此处有快速修复的办法,即将缺少的key加进去即可。
观察里面的报错,其实是4EB27DB2A3B88B8B(请注意,每个人的KEY会不一样,所以需要从自己的报错信息中找出对应的值,替换到下面的指令,如果是多个key,相应的发送多条指令即可),这个key缺失,因此只要将其加入即可,可使用如下指令:

ubuntu@ubuntu-virtual-machine:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
Executing: /tmp/apt-key-gpghome.6DtlfeE5p7/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
gpg: key 7721F63BD38B4796: "Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>" 1 new signature
gpg: key 7721F63BD38B4796: "Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>" 1 new subkey
gpg: key 7721F63BD38B4796: "Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>" 2 signatures cleaned
gpg: Total number processed: 1
gpg:            new subkeys: 1
gpg:         new signatures: 1
gpg:     signatures cleaned: 2

后续即可正常进行升级操作文章来源地址https://www.toymoban.com/news/detail-519638.html

到了这里,关于【Ubuntu升级报错】“the following signatures couldn’t be verified because the public key is not available”的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包