apt-get update 命令后出现问题

apt-get update 命令后出现问题

最近,我尝试从 Ubuntu tweak 安装谷歌地球。该程序要求我添加谷歌地球的存储库。好吧,在我执行命令后,我发现一条错误消息,告诉我无法添加源,系统无法构建包树。我在终端中运行sudo apt-get update ,发现以下错误:

Fetched 143 kB in 3min 43s (637 B/s)                                           
Reading package lists... Error!
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures were invalid: BADSIG 6AF0E1940624A220 Launchpad PPA for TualatriX
W: GPG error: http://eg.archive.ubuntu.com trusty-backports Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]>
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/eg.archive.ubuntu.com_ubuntu_dists_trusty_multiverse_i18n_Translation-en%5fUS
E: The package lists or status file could not be parsed or opened.

我无法启动 Ubuntu 软件中心,并且屏幕顶部的栏中出现一个减号。请告诉我应该按步骤做什么。我有 Ubuntu 14.04 trusty tahr。

答案1

对于 GPG 错误,运行sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220 40976EAF437D05B5以导入密钥。

对于 MergeList 问题,运行sudo rm /var/lib/apt/lists/*

最后,运行sudo apt-get update

答案2

总结一下saiarcot895

对于这样的错误

W: GPG error: http://archive.ubuntu.com trusty Release:
The following signatures were invalid: BADSIG [ some_number ] 
Ubuntu Archive Automatic Signing Key <[email protected]>

执行此操作 - 最好一次执行一条指令 -

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [ some_number ]
cd /var/lib/apt
ls -la
sudo mv lists lists_bak
sudo mkdir -p lists/partial
apt-get update

大致

  1. gpg通过apt-keyvia调用apt-get,下载新密钥
  2. 转到apt保存数据的位置
  3. apt看看目前的数据
  4. 重命名apt缓存目录以备份并清除缓存
  5. 创建新的apt缓存目录
  6. apt更新了解的软件包的缓存

相关内容