LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-18-2007, 02:56 AM   #1
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Rep: Reputation: 49
apt-get error


I get the following error whenever i try to do anything with apt-get:


Code:
copperskull:~# apt-get install gnome
Reading package lists... Error!
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.
And then when I do a dpkg-reconfigure apt-get, I get the following output.


Code:
copperskull:~# dpkg-reconfigure apt-get
dpkg-query: failed to open package info file `/var/lib/dpkg/status' for reading: No such file or directory
/usr/sbin/dpkg-reconfigure: apt-get is not installed

I don't remember doing anything to screw up my system like this.

Anybody got a lead on it?
 
Old 02-18-2007, 03:20 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Could not open file /var/lib/dpkg/status
... well is the file there?
Quote:
Anybody got a lead on it?
Did you try searching LQ? http://www.linuxquestions.org/questi...255#post805255

Perhaps:
# cp /var/lib/dpkg/status-old /var/lib/dpkg/status
# apt-get update

Caveat: check the filesystem - there is a reason this file became corrupt. If you are very unlucky, your HDD is starting to go.

Last edited by Simon Bridge; 02-18-2007 at 03:25 AM.
 
Old 02-18-2007, 04:11 AM   #3
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
Yeah..thanks for the input.

I tried to search LQ for this very error..but wasn't lucky. Well...finally I got the exact stuff I wanted.

I created a new file with the following contents:

File: /var/lib/dpkg/status

Code:
Package: libc6
Status: install ok installed
Version: 2.3.1-9
EOF
Now everything runs fine.

BTW, I am running Debian Etch. So do you think this particular file has got the right contents?

Well..I was surprised but there wasn't no backup of this file present.
I guess this file got corrupt after I did a fsck.reiserfs --rebuild-tree on my root partition. (Of course after a system crash..and the partition wasn't mounted.)
 
Old 02-18-2007, 04:40 AM   #4
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Quote:
Package: libc6
Status: install ok installed
Version: 2.3.1-9
Isn't that a bit old? Etch should be using 2.3.6.ds1-11. According to debian.org 2.3.1-9 is from sarge when it was in testing.
 
Old 02-18-2007, 07:57 AM   #5
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by Daws
Isn't that a bit old? Etch should be using 2.3.6.ds1-11. According to debian.org 2.3.1-9 is from sarge when it was in testing.

Truly. Thats what I began to think after doing it.

After creating the new file as mentioned earlier..I thought this new setup is gonna work. I tried installing a software and everything was fine upto the point of downloading it. While installing, it gave me the same error.

I searched around a bit and noticed that a backup is stored in /var/backups/dpkg.status.*
I created a new /var/lib/dpkg/status file out of this backup, and now things are going good.

The following link was pretty useful:

http://www.debianhelp.co.uk/debianproblem.htm
 
Old 02-18-2007, 07:36 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
why didn't you just restore statu-old?
[edit] silly me: didn't read the last post properly. Please disregard.

Last edited by Simon Bridge; 02-18-2007 at 07:37 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
APT-GET Error carlosinfl Debian 6 10-11-2006 09:27 AM
apt-get error PsychosisNode Debian 1 08-02-2004 02:02 PM
apt-get error wedgeworth Linux - Software 1 04-16-2004 11:30 AM
apt-get error installing xlibs 4.2.1-14, apt-get won't work at all now pib Debian 1 12-10-2003 11:39 PM
apt-get Error goal2guy Linux - Software 0 12-02-2003 06:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration