LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 03-14-2010, 09:26 AM   #1
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Rep: Reputation: 0
Apt-get update gets stuck while reading package list on my slug


I'm running Debian Lenny on a Linksys NSLU2 Slug, I haven't run updates on it for a while.

upon running apt update I get the following error after it gets stuck on reading the package list at about 30%
Code:
E: Read error - read (5 Input/output error)
The package lists or status file could not be parsed or opened.
I've googled this and come up with various potential fixes such as:-
Code:
apt-cache clean
apt-get clean all
dpkg --configure -a
apt-get install -f
rm /var/cache/apt/*.bin
But they don't seem to have solved the problem.

Thanks in advance
 
Old 03-14-2010, 08:27 PM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,422

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
It could be a corrupt file in /var/lib/apt/lists, or it could be a corrupt Packages file on one mirrors in your /etc/apt/sources.list.

Accordingly: Have you tried changing your sources.list? Or checking the sanity of the files in /var/lib/apt/lists/?

Cheers,

Evo2.
 
Old 03-15-2010, 09:15 AM   #3
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by evo2 View Post
It could be a corrupt file in /var/lib/apt/lists, or it could be a corrupt Packages file on one mirrors in your /etc/apt/sources.list.

Accordingly: Have you tried changing your sources.list? Or checking the sanity of the files in /var/lib/apt/lists/?

Cheers,

Evo2.
I'm just using the main US server as I found I couldn't get anything with any local mirrors, but I'll check them out again.

How do you check the sanity of files?

Thanks
 
Old 03-15-2010, 10:40 PM   #4
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,422

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by rolnics View Post
How do you check the sanity of files?
As a first check you could just do:
Code:
file /var/lib/apt/lists/*
Then you could have a look at the text files with the less command.

Cheers,

Evo2.
 
Old 03-16-2010, 11:14 AM   #5
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Original Poster
Rep: Reputation: 0
The sanity check provided I assume was ok, it listed all the files as either text file or ASCII etc.

I checked the text files as suggested and I assume that they are ok as well as they were all identifiable text, nothing strange that I saw?

Also I changed the mirror that I was using in my source list, I thought I had a break through as it reached just over 50%........then I stuck again....perhaps I should have waited till it came up with an error message! I'll have to give it aother try later.

Thanks for the help
 
Old 03-29-2010, 04:50 AM   #6
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Original Poster
Rep: Reputation: 0
I'm still having issues with apt updating.So over the weekend I tried updating again, but this time I had a thought and ran the update with one line of my source list at a time! Thankfully its only a two liner! The first line timed out and gave me a different error about bzip2, I've got a screen shot at home. The other line worked fine that was for security updates, although the kernel update threw up something else, which I got sorted .... I think!

But any more suggestions on this issue would be great.
 
Old 03-29-2010, 04:53 AM   #7
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,422

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by rolnics View Post
I'm still having issues with apt updating.So over the weekend I tried updating again, but this time I had a thought and ran the update with one line of my source list at a time! Thankfully its only a two liner! The first line timed out and gave me a different error about bzip2, I've got a screen shot at home. The other line worked fine that was for security updates, although the kernel update threw up something else, which I got sorted .... I think!
Making progress. Cool.

Quote:
But any more suggestions on this issue would be great.
Ok, sounds like there is something wrong with that mirror. What is the line that is causing the problem?

Cheers,

Evo2.
 
Old 03-30-2010, 12:50 PM   #8
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Original Poster
Rep: Reputation: 0
Right here's a cat of my source.list:-

Code:
#deb http://ftp.us.debian.org/debian/ lenny main
#deb http://security.debian.org/ lenny/updates main

deb http://ftp.uk.debian.org/debian/ lenny main
#deb http://security.debian.org/ lenny/updates main
Running an update like that resulted in an error as per the attached screen shot.

Running it with the ftp line commented out gives me the security updates although the linux-image-2.6.26-2-ixp4xx upgrade is being a pain. I had the problem before and after a reboot usually its fine, but its persisting at the moment, just trying it again now. I think I'm making progress now. Just done an apt-get clean. Success!

So back to the original problem as attached.

Thanks
Attached Images
File Type: png slug: ~-1.png (141.9 KB, 8 views)

Last edited by rolnics; 03-30-2010 at 12:53 PM.
 
Old 03-30-2010, 01:31 PM   #9
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Rep: Reputation: 36
Code:
#deb http://ftp.us.debian.org/debian/ lenny main
#deb http://security.debian.org/ lenny/updates main

deb http://ftp.uk.debian.org/debian/ lenny main
#deb http://security.debian.org/ lenny/updates main
maybe the line should read:
Code:
deb http://http.uk.debian.org/debian/ lenny main
EDIT:
or maybe
deb ftp://ftp.uk.debian.org/debian/ lenny main
or try the one in the US...
deb http://http.us.debian.org/debian/ lenny main

the point being that the ftp and the http mixed on the same line might be a problem (though I suppose if it worked in the past...)

Last edited by radiodee1; 03-30-2010 at 01:40 PM. Reason: additions
 
Old 03-31-2010, 06:13 AM   #10
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks, I can see your point and I'll give it a go later when I'm home. Its just strange how its all worked before and has now suddenly stopped?! Just a typical computer thing?!

Maybe that's why the security line is working.

Last edited by rolnics; 03-31-2010 at 06:15 AM.
 
Old 04-01-2010, 12:31 PM   #11
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the suggestions here's the result:-

Quote:
Originally Posted by radiodee1 View Post
I tried the above as suggested and got the error mark 1on the attached screen shot.

Quote:
Originally Posted by radiodee1 View Post
maybe the line should read:
Code:
deb http://http.uk.debian.org/debian/ lenny main
I tried the above and got the error marked 2. I will also try different severs with the above options as well.
Attached Images
File Type: png slug2: ~.png (147.6 KB, 6 views)
 
Old 04-05-2010, 07:59 AM   #12
rolnics
LQ Newbie
 
Registered: Dec 2006
Location: U.K.
Distribution: Ubuntu & Debian
Posts: 15

Original Poster
Rep: Reputation: 0
Finally! Everything seems to be working now! I tried update earlier today and it worked fine with both lines of my source! Then a little while later I though I'd try it again, just so see if it was a one off! Surprise I got stuck again! Anyway, I did some more searching and found and ran:-
Code:
apt-cache clean
Which gave me another error:-

Code:
E: Read error - read (5 Input/output error)
Seen it before somewhere

Done some more searching and found that there was a past bug with updates, and suggested these commands:-

Code:
rm /var/lib/dpkg/status
cp /var/lib/dpkg/status-old /var/lib/dpkg/status
rm -rf /var/lib/apt/lists/*
dpkg --configure -a
aptitude update
aptitude upgrade
aptitude install -f
But when I got to the update command I got this error:-
Code:
E: Lists directory /var/lib/apt/lists/partial is missing.
I found another post that said that apt-cache clean causes the above error and to fix it enter this:-
Code:
mkdir -p /var/lib/apt/lists/partial
Then back finally running the last 3 commands:-
Code:
aptitude update
aptitude upgrade
aptitude install -f
Now everything seems to be working ok again!

Thanks for the help, I've learnt a far bit from this!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 reading packing list vivasjimmy Linux - Software 6 09-06-2009 10:17 PM
apt-get stuck after bad package ApellA Linux - Newbie 4 12-08-2005 03:41 PM
Apt Errors reading pkg list TitaniumTaz Ubuntu 3 08-19-2005 04:42 PM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 12:28 PM
apt-get is stuck on 'scrollkeeper' package jon_k Debian 2 04-03-2005 06:51 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration