LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-02-2005, 09:52 PM   #1
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Rep: Reputation: 32
apt-get update problems


Hi,
When I try apt-get update, I get the following output -


Failed to fetch
security.debian.org/dists/testing/updates/main/binary-i386/Packages.gz[
Sub-process gzip returned an error code (1)
Failed to fetch
security.debian.org/dists/testing/updates/main/binary-i386/Packages.gz[
Sub-process gzip returned an error code (1)
Reading Package Lists... Done
W: Couldn't stat source package list security.debian.org[/url] testing/updates/main Packages (/var/lib/apt/lists/security.debian.org_dists_testing_updates_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list security.debian.org[/url] testing/updates/main Packages (/var/lib/apt/lists/security.debian.org_dists_testing_updates_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Duplicate sources.list entry security.debian.org[/url] testing/updates/contrib Packages (/var/lib/apt/lists/security.debian.org_dists_testing_updates_contrib_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
E: Some index files failed to download, they have been ignored, or old ones used instead.

What could be wrong? How can I set right these errors and warnings?
Thanking in advance,
 
Old 01-02-2005, 10:26 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Basically you seem to have got a gzip problem, maybe the files where corrupt?

Try removing the files in /var/lib/apt/lists/ and doing apt-get update again.
 
Old 01-02-2005, 11:52 PM   #3
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Original Poster
Rep: Reputation: 32
>> Try removing the files in /var/lib/apt/lists/ and doing apt-get update again.

I moved all the files in /var/lib/apt/lists to another directory and tried apt-get update.
This is the output I got -
E: Lists directory /var/lib/apt/lists/partial is missing.
 
Old 01-03-2005, 02:33 AM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Just mkdir /var/lib/apt/lists/partial

then do apt-get update again.

This directory just contains copies of the package lists from the servers, theres no configuration information in the directory at all. This is whats used to build the package lists for dpkg, The computer does nothing else with them so that they can be compared with whats on the servers to see if they match.
 
Old 01-03-2005, 06:51 AM   #5
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Original Poster
Rep: Reputation: 32
Thank you for your patience.
I made the 'partial' subdir and then did apt-get upgrade.
Here is the output I received -
gzip: stdin: not in gzip format
Err security.debian.org testing/updates/main Packages
Sub-process gzip returned an error code (1)
98% [4 Packages gzip 0]
gzip: stdin: not in gzip format
Err security.debian.org testing/updates/contrib Packages
Sub-process gzip returned an error code (1)
Fetched 42B in 1s (29B/s)
Failed to fetch security.debian.org/dists/testing/updates/main/binary-i386/Packages.gz Sub-process gzip returned an error code (1)
Failed to fetch security.debian.org/dists/testing/updates/contrib/binary-i386/Packages.gz Sub-process gzip returned an error code (1)
Reading Package Lists... Done
W: Duplicate sources.list entry security.debian.org testing/updates/main Packages (/var/lib/apt/lists/security.debian.org_dists_testing_updates_main_binary-i386_Packages)
W: Duplicate sources.list entry security.debian.org testing/updates/contrib Packages (/var/lib/apt/lists/security.debian.org_dists_testing_updates_contrib_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
E: Some index files failed to download, they have been ignored, or old ones used instead.


Do you something is wrong the particular packages at security.debian.org?
 
Old 01-03-2005, 12:18 PM   #6
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
What does you /etc/apt/sources.list look like?

You seem to be missing debian-security from the path
security.debian.org/debian-security/dists/testing/updates/main/binary-i386/Packages.gz is the correct file path.
 
Old 01-03-2005, 09:42 PM   #7
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Original Poster
Rep: Reputation: 32
Ok! Here is my /etc/apt/sources.list

# deb file:///cdrom/ sarge main

deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20041022)]/ unstable contrib main

deb security.debian.org/ testing/updates main contrib
deb ftp.us.debian.org/debian/ testing main non-free contrib
deb non-us.debian.org/debian-non-US/ testing/non-US main contrib non-free
deb security.debian.org/ woody/updates main contrib non-free
deb security.debian.org/ testing/updates main contrib non-free

deb ftp.us.debian.org/debian/ unstable main non-free contrib


I have removed the 'http://' from the urls to comply with the terms and conditions of the forum.
 
Old 01-03-2005, 11:39 PM   #8
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Remove the first line with

deb security.debian.org/ testing/updates main contrib

Since below you have:

deb security.debian.org/ testing/updates main contrib non-free

I susspect that one of these are ftp and not http. The first line simply needs removing.
 
Old 01-03-2005, 11:58 PM   #9
Draygo
Member
 
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73

Rep: Reputation: 15
Uhm you are running Sarge which is unstable if i remember right. Either way only stable has security. So comment out any lines that have security in it in your sources.list file.
 
Old 01-04-2005, 04:51 AM   #10
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Original Poster
Rep: Reputation: 32
Thanks leonscape and draygo. I commented out all the links containing 'security'. And now apt-get works without any errors.
Thank you both.
 
  


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 install not working / apt-get update is ok remy215 Debian 2 10-01-2005 08:02 PM
Anybody else having problems with "apt-get update"? vharishankar Debian 6 08-09-2005 01:40 AM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 01:28 PM
Does 'apt-get update' update the database used by 'apt-cache'? davidas Debian 5 04-20-2004 02:27 AM
update problems yum/apt-get grapier Fedora 1 01-20-2004 09:33 AM

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

All times are GMT -5. The time now is 05:19 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration