FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-14-2011, 10:44 AM
Tony van der Hoff
 
Default broken dpkg status

Due to a combination of fiddling and finger-trouble I have contrived to
delete part of my /var partition. Unfortunately, I have never thought to
back up /var, being transient data... Big mistake!


Anyway, the most pressing problem at the moment is that apt fails, due
to missing status data:


E: Could not open file /var/lib/dpkg/status - open (2: No such file or
directory)

E: The package lists or status file could not be parsed or opened.

How do I recover from this?

--
Tony van der Hoff | mailto:tony@vanderhoff.org
Buckinghamshire, England |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E1EC874.6090509@vanderhoff.org">http://lists.debian.org/4E1EC874.6090509@vanderhoff.org
 
Old 07-14-2011, 12:06 PM
Jörg-Volker Peetz
 
Default broken dpkg status

A daily backup of /var/lib/dpkg/status is maintained by the system in
/var/backups. Has this directory survived your accident?
--
Best regards,
Jörg-Volker.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: ivmm3m$kvr$1@dough.gmane.org">http://lists.debian.org/ivmm3m$kvr$1@dough.gmane.org
 
Old 07-14-2011, 12:22 PM
Tony van der Hoff
 
Default broken dpkg status

On 14/07/11 13:06, Jörg-Volker Peetz wrote:

A daily backup of /var/lib/dpkg/status is maintained by the system in
/var/backups. Has this directory survived your accident?


Thanks for the reply. Unfortunately it hasn't.

--
Tony van der Hoff | mailto:tony@vanderhoff.org
Buckinghamshire, England |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E1EDF6D.2070007@vanderhoff.org">http://lists.debian.org/4E1EDF6D.2070007@vanderhoff.org
 
Old 07-15-2011, 11:52 AM
Tony van der Hoff
 
Default broken dpkg status

On 14/07/11 11:44, Tony van der Hoff wrote:

Due to a combination of fiddling and finger-trouble I have contrived to
delete part of my /var partition. Unfortunately, I have never thought to
back up /var, being transient data... Big mistake!


For the archives, there is a useful script at
http://linuxmafia.com/faq/Debian/package-database-rebuild.html
which scans the /usr/share/doc directory for installed packages, and
rebuilds the database from that.


Don't know yet how fully it's fixed, but it looks like I've got most of
the database back; apt and synaptic at least are working ... phew!


Cheers, Tony


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E202A18.6040207@vanderhoff.org">http://lists.debian.org/4E202A18.6040207@vanderhoff.org
 
Old 07-15-2011, 11:52 AM
Tony van der Hoff
 
Default broken dpkg status

On 14/07/11 11:44, Tony van der Hoff wrote:

Due to a combination of fiddling and finger-trouble I have contrived to
delete part of my /var partition. Unfortunately, I have never thought to
back up /var, being transient data... Big mistake!


For the archives, there is a useful script at
http://linuxmafia.com/faq/Debian/package-database-rebuild.html
which scans the /usr/share/doc directory for installed packages, and
rebuilds the database from that.


Don't know yet how fully it's fixed, but it looks like I've got most of
the database back; apt and synaptic at least are working ... phew!


Cheers, Tony


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E202A18.6040207@vanderhoff.org">http://lists.debian.org/4E202A18.6040207@vanderhoff.org
 
Old 07-16-2011, 09:40 AM
Wolodja Wentland
 
Default broken dpkg status

On Thu, Jul 14, 2011 at 11:44 +0100, Tony van der Hoff wrote:
> Due to a combination of fiddling and finger-trouble I have contrived
> to delete part of my /var partition. Unfortunately, I have never
> thought to back up /var, being transient data... Big mistake!
>
> Anyway, the most pressing problem at the moment is that apt fails,
> due to missing status data:
>
> E: Could not open file /var/lib/dpkg/status - open (2: No such file
> or directory)
> E: The package lists or status file could not be parsed or opened.
>
> How do I recover from this?

Uh, tough one. You can try the following which relies on the fact that every
package install documentation in /usr/share/doc/PKG and will reinstall all
those packages:

find /usr/share/doc -maxdepth 1 -mindepth 1 -type d -not -name texmf
-not-name debian -printf 'install %f
'
| xargs aptitude --schedule-only reinstall; aptitude install;;

Unfortunately that also means that the information about
automatically/manually installed packages is lost.

There are certainlt other ways, but I like this one. I will think about how
you could get the manually/automatically installed information back.

--
.'`. Wolodja Wentland <babilen@gmail.com>
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
 
Old 10-24-2011, 06:05 PM
Andrei Popescu
 
Default broken dpkg status

On Jo, 14 iul 11, 11:44:04, Tony van der Hoff wrote:
> Due to a combination of fiddling and finger-trouble I have contrived
> to delete part of my /var partition. Unfortunately, I have never
> thought to back up /var, being transient data... Big mistake!

Just for the archives: /var is not transient, but variable data.
Transient would be the new /run and /tmp, which is why they can be put
on tmpfs

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 

Thread Tools




All times are GMT. The time now is 02:46 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org