LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Package manager Error: The package lists or status file could not be parsed or opened (https://www.linuxquestions.org/questions/debian-26/package-manager-error-the-package-lists-or-status-file-could-not-be-parsed-or-opened-4175573387/)

Chrisbar 02-27-2016 02:25 AM

Package manager Error: The package lists or status file could not be parsed or opened
 
I'm running Stretch and 6 days ago I had trouble in Synaptic using the Reload function.
I tried a few times thinking I had a connection problem but now:-
Synaptic gives me the following error message and when I close the error message box Synaptic closes.

E: Encountered a section with no Package:header
E: Problem with MergeList /var/lib/apt/lists/ftp.iinet.net.au_debian_debian_dists_stretch_main_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed. please report.

I've tried apt-get clean and apt-get update without any improvement.

Can I delete the file named in the error message or replace it with an empty file? Or would changing mirrors do anything useful?

oldtechaa 02-28-2016 06:25 AM

Post sources.list.

Chrisbar 02-28-2016 06:43 PM

Sources list minus commented out CD lines is

deb http://ftp.iinet.net.au/debian/debian/ stretch main contrib non-free

deb http://security.debian.org/ stretch/updates main contrib
deb-src http://security.debian.org/ stretch/updates contrib main

I have been using and updating the box for a few months and haven't changed the sources but maybe I should.
The mirror I'm using gives me free data for Debian.

oldtechaa 02-29-2016 11:52 AM

You could try deleting /var/lib/apt/lists/ftp.iinet.net.au_debian_debian_dists_stretch_main_binary-amd64_Packages. It should just re-download the Packages list. I've never done this, though, so I can't be sure of all the risks involved.

Chrisbar 02-29-2016 04:59 PM

Risks
 
Thanks

I have considered doing that and maybe which ever other ones as necessary if it barfed on the first one and didn't check the rest.
I don't really want to make things worse because a re-install over my SLOW connection is a pain and it takes forever to get the links etc all set up again.

Timothy Miller 02-29-2016 09:06 PM

You should be able to delete the file with no adverse affects. Just your next apt-get update will be SLOW (since it's downloading everything new).

Have you ever considered trying the debian redirector to see if you got a faster connection? Not sure how slow the actual connection is, but MIGHT help some.

Chrisbar 02-29-2016 10:59 PM

I'll try it later when my wife is not using teh connection
 
My connection is slow between my modem and the exchange. Nothing I can do except wait until the NBN in Australia gets it's act together and starts work in this area.

Chrisbar 03-01-2016 01:22 AM

Solved
 
Thanks to Tim.
Had to progressively cycle through about 8 deletes.

Stretch on a NUC5CPYH

lakshmibharatham 08-09-2016 06:06 AM

Hi I tried to update using sudo apt-get update command but am getting some messages like
[ ERR]: Reading package lists
E: Encountered a section with no Package:header
E: Problem with MergeList /var/lib/apt/lists/ftp.iinet.net.au_debian_debian_dists_wheezy-updates_main_il8n_Translation-en.gz
E: The package lists or status file could not be parsed or opened.
Please send me the solution

Dizzle 01-20-2018 07:57 AM

Code:

#! /bin/sh

ubuntu-support-status
sudo grep -R proxy /etc/apt/*
grep proxy  /etc/environment
echo $http_proxy
echo $ftp_proxy
grep proxy /etc/bash.bashrc
grep proxy ~/.bashrc
cat /etc/apt/apt.conf
sudo fuser -vvv /var/lib/dpkg/lock
sudo fuser -vvv /var/cache/apt/archives/lock
cat /etc/lsb-release
uname -a
sudo rm /var/lib/apt/lists/lock
sudo rm  /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status  ||  sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo rm /var/cache/apt/*.bin
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get --purge autoremove
sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
sudo dpkg --configure -a
sudo dpkg --clear-avail
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;


Found this on ask ubuntu which worked for me and resets everything. Just paste it as a shell program.

Cheers!


All times are GMT -5. The time now is 06:53 PM.