无法通过apt-get安装任何东西。apt-get update出现问题。

我无法使用apt-get安装任何东西。我认为这个问题是由于某种gpg错误引起的。根据我的信念,我已经尽了几乎所有在网上找到的方法。当我运行apt-get update时,就会出现以下情况。
mody@ubuntu:~$ sudo apt-get update
Get:1 http:/dl.google.com stable Release.gpg                                  
Get:2 http:/dl.google.com stable Release                                      
Ign http:/dl.google.com stable Release                                        
E: GPG error: http:/dl.google.com stable Release: The following signatures were invalid: NODATA 1 NODATA 2
mody@ubuntu:~$ 

我试过这些。
mody@ubuntu:~$ sudo apt-get clean
mody@ubuntu:~$ sudo apt-get update && sudo apt-get upgrade
Get:1 http:/dl.google.com stable Release.gpg
Get:2 http:/dl.google.com stable Release                                      
Ign http:/dl.google.com stable Release                                        
E: GPG error: http:/dl.google.com stable Release: The following signatures were invalid: NODATA 1 NODATA 2

没起作用

mody@ubuntu:~$ sudo apt-get update -o Acquire::http::No-Cache=True
Get:1 http:/dl.google.com stable Release.gpg
Get:2 http:/dl.google.com stable Release                                      
Ign http:/dl.google.com stable Release                                        
E: GPG error: http:/dl.google.com stable Release: The following signatures were invalid: NODATA 1 NODATA 2

没有生效

mody@ubuntu:~$ sudo apt-get update -o Acquire::BrokenProxy=true 
Get:1 http:/dl.google.com stable Release.gpg
Get:2 http:/dl.google.com stable Release                                      
Ign http:/dl.google.com stable Release                                        
E: GPG error: http:/dl.google.com stable Release: The following signatures were invalid: NODATA 1 NODATA 2
mody@ubuntu:~$ 

即使如此
点击系统>>管理>>软件源 点击“下载自”菜单,选择主服务器 在终端中输入以下内容。
sudo apt-get update

再次运行更新管理器。
但是没有起作用。
我还更改了源,使用了Ubuntu网站上提供的一个可用源。我不知道为什么这样做,但是那并没有帮助。
进行了强制更新,问题仍然存在。
mody@ubuntu:~$ sudo apt-get update -f

[sudo] password for mody: 
Get:1 http:/dl.google.com stable Release.gpg
Get:2 http:/dl.google.com stable Release                                      
Ign http:/dl.google.com stable Release                                        
E: GPG error: http:/dl.google.com stable Release: The following signatures were invalid: NODATA 1 NODATA 2

沮丧。

Synaptic和aptitude都没有安装。尝试更改下载服务器,但无济于事。

附注:由于发布时链接出现问题,我删除了存在///


@Azker 这个 sudo apt-get install -f 命令是否会强制更新? - Avinash Raj
1请编辑您的问题并发布“cat /etc/apt/sources.list”和“ls /etc/apt/sources.list.d/”命令的输出。我相信这些目录中还有一些残留条目。您也可以转到“系统>>管理>>软件源”,在“其他软件”选项卡上取消选择所有包含dl.google.com的条目。 - Viktor K
尝试强制更新 > sudo apt-get update -f .. @AvinashRaj - 感谢你的指出。 - AzkerM
-f, --fix-broken 修复; 尝试在现有的依赖关系出现问题时进行修正。@Azker -f并不是指强制执行。 - Avinash Raj
@arhimed做到了。非常感谢!请进入“系统”>>“管理”>>“软件源”,在“其他软件”选项卡上取消所有包含dl.google.com的勾选。 - Pramod
1个回答

从谷歌Linux软件仓库下载的软件包签名密钥可能需要重新导入。可以在终端中使用以下命令完成此操作。
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

或者我们也可以下载并保存密钥,然后手动导入。
来源:Google