Linux problem with mergelist

How do I fix a «Problem with MergeList» or «status file could not be parsed» error when trying to do an update?

It keeps baffling me how awkwardly this operating system handles its updates, even now, that this and similar things are required after no special misuse by the user.

10 Answers 10

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:

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

-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 like this

picture of man page options

This also works for error Reading package lists. Error! E: Malformed Description-md5 line; includes invalid character ‘fc1f7600accbcc»07ef9954ba3306c14’ E: The package lists or status file could not be parsed or opened. in out-of-the-box Ubuntu 13.04 (sources.list never edited manually)

Open a Terminal and run the following commands one at a time:

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

@speedox, according to man rm , -v means ‘verbose’, and -f means ‘force’. In other words, remove all designated files without prompting and tell the user what it is doing.

In my case, just doing the sudo apt-get update fixed the problem. I think Allan mentioned newer versions of apt correct this automatically, so maybe try just the update first.

You screwed up when you edited /var/lib/dpkg/status . Restore it from the backup that you made before editing it. Of course, you made a backup, right?

Since you didn’t make a backup, edit it again, carefully. Try not to cause more damage.

You can use /var/lib/dpkg/status.old as a reference point. This is a backup of the status file from before the last time dpkg was run. Run

diff /var/lib/dpkg/status.old /var/lib/dpkg/status 

to see the differences. Undo the changes that you made manually, and keep the changes that were made by the last dpkg run.

Читайте также:  Linux terminal сменить пользователя

If you really can’t manage to repair the file, copy /var/lib/dpkg/status.old over /var/lib/dpkg/status . You will get a well-formed, but out-of-date package database.

You never need to edit /var/lib/dpkg/status in normal operation. Even whe things go seriously wrong, /var/lib/dpkg/status is not something that tends to require administrator intervention. Whatever your problems with crossplatformui were, there is probably a better way of solving them. The only time I’ve ever needed to edit /var/lib/dpkg/status was when an upstream Packages file was broken.

I would also like to know the better way you mentioned to remove crossplatformui if you could help coz i tried every possible way to remove it and tried finding many solutions but only the one i’ve mentioned has worked.

@Nirmik No idea about crossplatformui . Ask that as a separate question. I can tell you that in over a decade of using dpkg , including many unofficial sources, I’ve very very rarely needed to edit the status file, and only when there was a broken third-party repository.

Okay. Thanx a lot once again. as you suggest i’ll post it as a new question 🙂 also as you seem a very advanced user i would like to ask you if you know anything about making non functioning HOT-KTEYS work?? (my wireless key doesent work)

re: < You screwed up when you edited /var/lib/dpkg/status >as for me — no, I’m not, I haven’t touched this file 🙂 However this is only solution that do solve the problem in my case. Thank you.

sudo apt-get clean sudo apt-get update 

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-get , dpkg , 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 .

For step 5, run these commands in the terminal window:

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 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"' _ '<>' \; 

I copied that verbatim from PackageManagementTroubleshoootingProcedure on 2 March 2014. Those commands have evolved in the past and the recommended commands in that article may be changed or expanded on again in the future. So you may want to work from step 5 there. (That article, created/edited by «Contributors to the Ubuntu documentation wiki»—especially Mark Rijckenberg—is licensed CC-BY-SA 3.0, which allows inclusion here with proper attribution.)

Читайте также:  Astra linux ald добавление пользователя

Some of those commands attempt to fix the problem (and also may show diagnostic information); others display valuable information about the problem that you can include in your question or otherwise provide to someone helping you. (Or, depending on your skills, may enable you to diagnose and solve it.)

Often this fixes it but when it doesn’t it often gives enough information to fix it.

You don’t have to manually type those commands; you can copy and paste them. I recommend pasting and running each one separately, though. This makes it clearer what output is from which commands.

Источник

How To Fix Ubuntu Update Error: Problem With MergeList

One of the most common error a user encounters while updating is Problem with MergeList. The error could be encountered while using both Ubuntu Update Manager and using the sudo apt-get update in terminal.

The complete error looks something like this:

E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.

It’s the second line that is important here. It tells you that the mentioned file in the second line got corrupted some how and so it cannot be parsed.

Fixing MergeList problem in Ubuntu

The one shot solution of this problem is to run the following two commands, one by one, in the terminal (Ctrl+Alt+T):

You can generate a fresh one with this command:

sudo apt-get clean && sudo apt-get update

Voila! That should solve the “problem with merge list” error.

Fixing MergeList problem in Debian and Raspbian OS

If you use Debian or Raspbian OS or even Ubuntu, you may see the MergeList error but the corrupted files may be different:

Reading package lists. Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/dpkg/status E: The package lists or status file could not be parsed or opened.

This time, the issue is with /var/lib/dpkg/status. Handling this error is slightly different and slightly more complicated than the previous one.

Now, you could but you shouldn’t just delete it straightaway. Make a backup first:

mv /var/lib/dpkg/status /var/lib/dpkg/status.old

What you need to do now is to get a backup of this status file and use it. The backup files are stored in /var/backups directory. You can list it out:

ls -l /var/backups/dpkg.status*
cp /var/backups/dpkg.status.0 /var/lib/dpkg/status

Try to run update now and see if the problem is fixed. If not, you can try with the next backup file. If the file is archived, you need to unzip it first. Once copied, run the update command again and check if it’s fixed.

Читайте также:  Сменить системное время линукс

In other frequent Ubuntu update errors, one is Failed to download repository information. You may want to check them as well. Enjoy Ubuntu 🙂

Источник

[Решено] Проблема с ошибкой MergeList в Ubuntu и Debian

Одна из наиболее частых ошибок, с которыми сталкивается пользователь при обновлении, — это Проблема с MergeList. Ошибка могла возникнуть при использовании как диспетчера обновлений Ubuntu, так и sudo apt-get update в терминале.

Полная ошибка выглядит примерно так:

E: Обнаружен раздел без Package: header, E: Проблема с MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages, E: список пакетов или файл состояния не может быть проанализирован или открыт.

Здесь важна вторая строка. Он сообщает вам, что упомянутый файл во второй строке каким-то образом был поврежден и поэтому не может быть проанализирован.

Исправление проблемы с MergeList в Ubuntu

Одноразовое решение этой проблемы — запустить в терминале одну за другой следующие две команды (Ctrl + Alt + T):

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

Вы можете создать новый с помощью этой команды:

sudo apt-get clean && sudo apt-get update

Вуаля! Это должно решить проблему «проблема со списком слияния» ошибка.

Устранение проблемы с MergeList в ОС Debian и Raspbian

Если вы используете ОС Debian, Raspbian или даже Ubuntu, вы можете увидеть ошибку MergeList, но поврежденные файлы могут быть разными:

Чтение списков пакетов. Ошибка! E: Обнаружен раздел без заголовка Package:. E: Проблема с MergeList / var / lib / dpkg / status. E: Списки пакетов или файл состояния не могут быть проанализированы или открыты.

На этот раз проблема связана с / var / lib / dpkg / status. Обработка этой ошибки немного отличается и немного сложнее, чем предыдущая.

Вы могли бы, но не должны просто удалять его сразу. Сначала сделайте резервную копию:

mv / var / lib / dpkg / status /var/lib/dpkg/status.old

Что вам нужно сделать сейчас, так это получить резервную копию этого файла состояния и использовать ее. Файлы резервных копий хранятся в каталоге / var / backups. Вы можете перечислить это:

ls -l /var/backups/dpkg.status*

Скопируйте последнюю резервную копию:

cp /var/backups/dpkg.status.0 / var / lib / dpkg / status

Попробуйте запустить обновление сейчас и посмотрите, решена ли проблема. Если нет, вы можете попробовать со следующим файлом резервной копии. Если файл заархивирован, вам необходимо распаковать это первое. После копирования снова запустите команду обновления и проверьте, исправлена ​​ли она.

В других частых Ошибки обновления Ubuntu , один Не удалось загрузить информацию о репозитории . Вы также можете проверить их. Наслаждайтесь Ubuntu 🙂

Подано в: Руководство С тегами: ошибка , Ошибка , список слияния , быстрая подсказка , Устранение неполадок , Ubuntu , Обновлять

Источник

Оцените статью
Adblock
detector