報錯界面
在ubuntu中運行apt-get update時,有時會出現(xiàn)如下報錯
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.
如果不去解決,無法繼續(xù)進行后續(xù)的升級操作
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包系統(tǒng)的安全機制引起的問題,有時系統(tǒng)無法包含所有的key。此處有快速修復(fù)的辦法,即將缺少的key加進去即可。
觀察里面的報錯,其實是4EB27DB2A3B88B8B(請注意,每個人的KEY會不一樣,所以需要從自己的報錯信息中找出對應(yīng)的值,替換到下面的指令,如果是多個key,相應(yīng)的發(fā)送多條指令即可),這個key缺失,因此只要將其加入即可,可使用如下指令:文章來源:http://www.zghlxwxcb.cn/news/detail-519638.html
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
后續(xù)即可正常進行升級操作文章來源地址http://www.zghlxwxcb.cn/news/detail-519638.html
到了這里,關(guān)于【Ubuntu升級報錯】“the following signatures couldn’t be verified because the public key is not available”的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!