How do I fix the GPG error “NO_PUBKEY”?
来源:互联网 发布:python 书籍 知乎 2016 编辑:程序博客网 时间:2024/06/11 05:51
##### Error
When it's to run 'sudo apt-get update" command, there will be some failures like this:
W:There is no public key available for the following key IDs: 3B4FE6ACC0B21F32
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F
##### Solution:
Execute the following commands in terminal
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>
where <PUBKEY> is your missing public key for repository, e.g. 8BAF9A6F.
Then update
sudo apt-get update
----------------------------------
ALTERNATE METHOD:
sudo gpg --keyserver pgpkeys.mit.edu --recv-key <PUBKEY>
sudo gpg -a --export <PUBKEY> | sudo apt-key add -
sudo apt-get update
%%%%%%%%%%%%%%%%%%%
ubuntu更新(sudo apt-get update)时,
出现错误:
“Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)”
解决方式:
1,打开 /etc/apt/sources.list.d/google-chrome.list 文件(用vim或者gedit等均可):
sudo vim /etc/apt/sources.list.d/google-chrome.list
2,修改文件内容:
原来是:
deb http://dl.google.com/linux/chrome/deb/ stable main
改为:
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
3,再次执行 更新命令即可通过了
sudo apt-get update
%%%%%%%%%%%%%%%
在运行sudo apt-get update的时候遇到以下错误:
- W: Failed to fetch bzip2:/var/lib/apt/lists/partial/mirrors.163.com_ubuntu_dists_quantal-updates_main_binary-i386_Packages Hash Sum mismatch
- E: Some index files failed to download. They have been ignored, or old ones used instead.
这里有一堆关于这个Error的帖子: Ubuntu Forums
关于这个问题的原因,答案挺多,不过总的来说就是提供源的服务器的问题。可能是因为网络问题导致tcp包没有发送完整,也有可能是因为服务器那边繁忙所以没有处理你的请求,也有可能是因为服务器那边进行了缓存导致软件列表不是最新的,等等。。。(如果哪里说错说漏了,欢迎批评指正补充~)
网上的解决方法挺多的:
(1)我是用这个方法解决的,from here
- sudo apt-get clean
- sudo apt-get update --fix-missing
- # 删除
- sudo rm -fR /var/lib/apt/lists/*
- # 新建相应文件夹
- sudo mkdir /var/lib/apt/lists/partial
- # 重新update
- sudo apt-get update
(3)换源。
好像是从ubuntu11.04开始,换源都可以在system settings里面直接操作了,不用命令行那么麻烦了。。。
ps:在天朝的话,如果是校园网的,就找个edu.cn的源;如果不是校园网的话,我个人用着163的mirror觉得还不错。
- How do I fix the GPG error “NO_PUBKEY”?
- GPG error NO_PUBKEY
- How do I fix the linker error in project upgraded from VS2010 to VS2013 where the linker is looking
- apt-get: NO_PUBKEY / GPG error
- fix the Ubuntu GPG Error BADSIG
- Apt-get : NO_PUBKEY / GPG error解决方法
- When I use the Report Viewer ,I have the error,how should i do?
- How do I fix Passenger application startup problem
- What is a NullPointerException, and how do I fix it?
- debian apt-get update GPG error for NO_PUBKEY
- How do I disable the screensaver/lock?
- How to fix GPG in updater
- How do I?
- OpenXML: How do I?
- How do I like the idea of cloning?
- How do I love thee? Let me count the ways
- How do I unzip tarballs with the 'bz2' extension?
- How do I look up for the system locale
- mysql可重复读和幻读实例
- 处理多字节数据转Unicode和 string转char
- 学习笔记
- php中的isset(),empty(),is_null()函数比较总结
- mysql的事务和锁
- How do I fix the GPG error “NO_PUBKEY”?
- 常用Git命令
- 搞点事情,使用node搭建反向代理
- UML的介绍
- 旋转数组的最小数字
- idea多project
- 统计单词个数
- C语言查找字符
- getaddrinfo ENOTFOUND api.github.com api.github.com:443