当我安装Heroku时,我的包管理器坏了

Bri*_*ant 8 heroku package-managers ubuntu-12.04

sudo apt-get install <anything>

Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/toolbelt.heroku.com_ubuntu_._en
E: The package lists or status file could not be parsed or opened.
Run Code Online (Sandbox Code Playgroud)

我接下来要解决这个问题的后续步骤是什么?


更新:我尝试重新安装并获得下面的输出.它似乎已安装,但是command not found: heroku当我heroku从命令行尝试时,我得到了.安装命令挂了很长时间[Waiting for Headers].

基于这些错误消息,我的下一步是什么?

W: GPG error: http://us.archive.ubuntu.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
W: GPG error: http://us.archive.ubuntu.com precise-backports Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>

W: GPG error: http://dl.google.com stable Release: The following signatures were invalid: BADSIG A040830F7FAC5991 Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com>
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release  

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
heroku-toolbelt is already the newest version.
Run Code Online (Sandbox Code Playgroud)

hou*_*ter 21

以下将解决此错误:

sudo apt-get clean 
cd /var/lib/apt 
sudo mv lists lists.old 
sudo mkdir -p lists/partial 
sudo apt-get clean 
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

  • 很高兴理解为什么这个有效! (6认同)