8
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.

What are my next steps to troubleshoot this?


Update: I tried to reinstall and got the output below. It seems like it installed, but I get command not found: heroku when I try heroku from the command line. The install command hung up for a long time on [Waiting for Headers].

What's my next step based on these error messages?

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.
4

3 回答 3

21

The following will fix this error:

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
于 2012-11-15T06:46:01.973 回答
0

You can try as follow:

sudo rm /var/lib/apt/lists/* -vf

sudo apt-get update

于 2014-12-04T08:41:01.243 回答
0

This worked for me

sudo rm -r /var/lib/apt/lists
sudo mkdir -p /var/lib/apt/lists/partial
sudo aptitude update
于 2015-07-20T00:02:53.047 回答