Var lib dpkg status

К сожалению, я удалил каталог dpkg , удалив блокировку. По ошибке я набрал

Теперь, когда я пытаюсь установить / удалить пакеты, он показывает мне следующую ошибку.

Что мне теперь делать?

5 ответов

Итак, что вы осудили на погибель?

Вы удалили 5 каталогов, файл состояния и т. д. Итак, давайте попытаемся исправить это. Сначала создайте каталог:

Восстановите некоторые резервные копии:

Теперь посмотрим, работает ли ваш dpkg (начните молиться):

Если все «нормально», то также восстановите базовые файлы:

Теперь попробуйте обновить список пакетов и т. д.:

Итак, давайте сделаем глубокий вдох. Уф. Сделайте ls -l /var/lib/dpkg и сравните с приведенным выше списком. Если какой-то файл -old отсутствует, не беспокойтесь, он будет там завтра.

Восстановите свою систему из резервной копии. Вы сделали резервные копии? Резервное копирование системы и данных имеет решающее значение для устранения непредвиденных ситуаций, таких как эта ошибка (ошибка пользователя) и аппаратный сбой. Если вам не удалось создать резервные копии, например, обсуждаемые здесь вы можете выполнить восстановление данных.

В будущем я предлагаю вам резервное копирование на регулярной основе, чтобы избежать катастрофических потерь данных. И я сомневаюсь, что вы забудете, что, как сказал @Braiam, root + rm + -r = disaster "

Well dpkg (система управления пакетами Debian) обеспечивает низкоуровневую инфраструктуру для обработки установки и удаления пакетов программного обеспечения Debian. Таким образом, удаление не было хорошей идеей, и вы можете вернуть ее обратно —

Загрузка файла с помощью wget :

Извлеките его в папку xxx.

надеюсь, что это сработает.

Просто выполните следующие шаги, убедитесь, что вы можете восстановить файлы, по крайней мере, apt-get или dpkg будут работать.

После этого теста будет ли это работать или нет.

Надеюсь, что это сработало. Если нет комментариев ниже. Имейте в виду, используйте особую осторожность, играя с sudo + rm -rf .

В соответствии с приведенной выше строкой вы должны быть root, чтобы выполнить процесс установки и удаления. Итак, войдите в систему как root либо через su или sudo

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

Читайте также:  Http www lfd uci edu gohlke pythonlibs

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

Are you new to LinuxQuestions.org? Visit the following links:
Site Howto | Site FAQ | Sitemap | Register Now

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux — A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author’s experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Click Here to receive this Complete Guide absolutely free.

Page 1 of 2 1 2 >

Hiya.
Ive recently installed a debian system, and mainly its going well. The APT system is indeed great. BUT recently it stopped working. whenever i try to install anything, theres a ‘parse error’ when reading the package lists (similar to that below). For a short term measure, I could remove the particular source to which it refered, and use different mirroirs. Now ive been forced to sort out the problem as it seems the problem is with the dpkg status file (/var/lib/dpkg/status). E.g when running ‘apt-get update’ I get this error:

Get:1 http://security.debian.org stable/updates/main Packages [179kB]
Get:2 http://security.debian.org stable/updates/main Release [110B]
Fetched 179kB in 1m4s (2790B/s)
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.

03-09-2004, 02:34 PM #1
Читайте также:  Pc900v описание на русском
bassclarinet
View Public Profile
View LQ Blog
View Review Entries
Find More Posts by bassclarinet

Try setting your Cache-Limit higher in apt.conf.

Found this web page that explains.

03-09-2004, 03:11 PM #2
augamecock
View Public Profile
View LQ Blog
View Review Entries
Visit augamecock’s homepage!
Find More Posts by augamecock

Thanks for the reply. Well, I couldnt find a file at /etc/apt/apt.conf. So I created one with the line as given.
APT::Cache-Limit "42123456";

There was a file "/etc/apt/apt.conf.d/70debconf" so I added the line there as well. Unfortunatly, this did not stop the error. So, I went to /var/lib/dpkg/ and renamed "status-2" to "status". This sorted out the prob for a while. I could run "apt-get update" without any probs. So, I ran "apt-get -f install" a few times (kept getting an error from "xfonts-scalable"). Now, its gone back to /var/lib/dpkg/status, and i get this out put:

#apt-get -f install
Reading Package Lists. Done
Building Dependency Tree. Done
Correcting dependencies. Done
The following extra packages will be installed:
gcc-3.3-base libc6 libc6-dev libdb1-compat libgcc1 libstdc++5
linux-kernel-headers locales x-window-system-core xfonts-scalable
xlibmesa3-gl xlibmesa3-glu
The following packages will be REMOVED:
libnss-db xlibmesa3
The following NEW packages will be installed:
gcc-3.3-base libdb1-compat libstdc++5 linux-kernel-headers xfonts-scalable
xlibmesa3-gl xlibmesa3-glu
5 packages upgraded, 7 newly installed, 2 to remove and 1019 not upgraded.
1 packages not fully installed or removed.
Need to get 0B/18.5MB of archives. After unpacking 12.1MB will be used.
Do you want to continue? [Y/n]
Preconfiguring packages .
dpkg: parse error, in file `/var/lib/dpkg/status’ near line 28404 package `xfonts-scalable’:
missing version
E: Sub-process /usr/bin/dpkg returned an error code (2)

btw, I am using Debian 3.2r2 Woody non-US + some packages from testing, on a PII 400 Mhz, 370 MB mem.
is this due to an error in the xfonts package, or can I fix it?


dav

03-11-2004, 02:56 AM #3
Читайте также:  Just cause 3 карта со всеми обозначениями
bassclarinet
View Public Profile
View LQ Blog
View Review Entries
Find More Posts by bassclarinet

Hi. Ok, I now see that my question was quite silly. Investigating I found that "/var/lib/dpkg/status" had been corrupted. To correct this, all I had to do was rename "status-old" (the backup) to status. This has sorted the problem and APT is back to working again.

03-18-2004, 10:58 AM #4
bassclarinet
View Public Profile
View LQ Blog
View Review Entries
Find More Posts by bassclarinet
07-04-2005, 05:12 AM #5
eye69
View Public Profile
View LQ Blog
View Review Entries
Find More Posts by eye69

I know this is an old thread but I just ran into the same problem. I tried renaming status-old to status and still get:

Reading package lists. Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status

If remove the file completely dpkg/apt has no clue what packages I have installed. I havent had a power outage or anything weird happen that I know of. Just did a d-u yesterday with no problems.

When I try to install any software, I encounter this error, and therefore I cannot update.

1 Answer 1

Lucky you! You have backups! And even more, they are made daily without you knowing! So, to restore the files just run:

If you need even older files there are more to choose from:

Just uncompress them using gunzip :

If the backups are no good, another way is doing a list of the doc directory contents:

06-09-2007, 08:08 PM #6
Rate this post

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *