- Linux

How do I fix a “Problem with MergeList” or “status file could not be parsed” error

How do I fix a “Problem with MergeList” or “status file could not be parsed” error

These terminal commands should solve your problem:

First remove the Merge List by opening a terminal (Press Ctrl+Alt+T to launch) and run this command*:

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

Next, generate a new one by running a simple update:

sudo apt-get update

Here is the bug report (and another) for this problem, which is now fixed so it shouldn’t create new malformed files, however if you already have the malformed files you need to remove them as explained in this post.

*The options used for rm are -v verbose

-v, –verbose explain what is being done

and -f force

-f, –force ignore nonexistent files and arguments, never prompt

If you are ever unsure about a command line or the options being used always refer to the manual page for the command. These can be accessed on the internet by searching for man and the command for example man rm or you can access the same information by typing exactly the same command in the terminal for example man rm instructions for quitting the page will be at the bottom of the terminal.


If your problem still not solved then

Following steps 2-5 in the Package Manager Troubleshooting Procedure usually solves this problem.

For step 2, disable all your PPAs. You can uncheck all of them in Software Sources the same way you’d uncheck just one; see How to disable a particular PPA?. You can re-enable them later.

For step 3, close any open programs you can. It’s probably safe to keep your web browser open so you have your instructions in front of you. But it’s particularly important to make sure any package managers are not running. This include the Software Center, the Software Updater (Update Manager in older versions of Ubuntu), Synaptic, and Gdebi. It also includes command-line package management utilities like apt-getdpkg, and aptitude.

Note that if other users are logged on at the same time, they should log off if possible.

For step 4, open a terminal window. One way to do this that works no matter what desktop environment you use, is to press Ctrl+Alt+T.

run these commands in the terminal window:

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
LANG=C;sudo apt-get clean
LANG=C;sudo apt-get autoclean
LANG=C;sudo apt-get --purge autoremove
LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
sudo dpkg --configure -a
sudo dpkg --clear-avail
LANG=C;sudo apt-get -f install
LANG=C;sudo apt-get --fix-missing install
LANG=C;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"' _ '{}' \;

Leave a Reply

Your email address will not be published. Required fields are marked *