[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt stuck at "Reading database"



[I'm hoping this isn't a duplicate post, but my first
attempt was rejected by bendel.debian.org as forged.]

Quoting Luis Finotti (luis.finotti@gmail.com):
> I've been trying to fix this problem, but have not found a solution
> yet. (I've also asked at the aptosid list without success.)
> 
> Before I resigned myself to a reinstall, I thought I'd post the output of
> 
>     strace apt-get dist-upgrade
> 
> (I killed the process a few seconds after it got stuck.)  The first
> 4000 lines are here:
> 
> http://www.math.utk.edu/~finotti/misc/DU.log

I took a look at this and I notice that apt is trying to upgrade 126
packages which is quite a mouthful. I also noticed that there are a
lot of lines matching /etc/apt/sources.list.d/...

In that situation, my first course of action would be to hide anything
but the essential sources.list contents of, basically, something like

# deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official i386 NETINST Binary-1 20130615-21:53]/ wheezy main

deb http://ftp.us.debian.org/debian/ wheezy main non-free contrib
deb-src http://ftp.us.debian.org/debian/ wheezy main non-free contrib

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free

Then I would   apt-get update   which will clear out /var/lib/apt/lists/
(AFAIK there's no point doing this until you've pruned /etc/apt/sources.list
because   apt-get update   will repopulate it.)

Then see if   apt-get upgrade   will work (ie not hang or crash) and
see what error messages it emits.

If apt is screwed, then the only way I know (not being an expert) of
trying to recover is to see if dpkg itself can install things, perhaps
by trying to reinstall the apt packages. (Obviously no dependency
problems in doing that.)

If apt is working but emitting errors, then it may be that you need to
look at whether the files in / var/lib/dpkg are ok. There is one level
of backup in there.

Cheers,
David.


Reply to: