解决Ubuntu在更新时提示“Requires installation of untrusted packages”的错误

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/leaf5022/article/details/23263055

        之前安装LLVM的时候,直接在LLVM官网找到deb源来安装。现在更新管理器提示有更新,却一直无法安装。每次都提示“Requires installation of untrusted packages”。然后用命令行试着更新一下:sudo apt-get update, 看到最后的错误提示:

W: GPG error: http://llvm.org llvm-toolchain-saucy-3.4 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 15CF4D18AF4F7421
W: GPG error: http://llvm.org llvm-toolchain-saucy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 15CF4D18AF4F7421
根据这个GPG error,Google一下,找到了 解决办法
很简单,只要执行如下命令就好:

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com XXXXX

XXXXX用上面提示的NO_PUBKEY后面跟的那一长串字符,这里是15CF4D18AF4F7421

然后再:

sudo apt-get update

这下应该不会有GPG error了,然后安装就可以顺利安装更新了。

猜你喜欢

转载自blog.csdn.net/leaf5022/article/details/23263055