LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get update problems (https://www.linuxquestions.org/questions/debian-26/apt-get-update-problems-273125/)

adityavpratap 01-02-2005 09:52 PM

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,

leonscape 01-02-2005 10:26 PM

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.

adityavpratap 01-02-2005 11:52 PM

>> 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.

leonscape 01-03-2005 02:33 AM

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.

adityavpratap 01-03-2005 06:51 AM

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?

leonscape 01-03-2005 12:18 PM

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.

adityavpratap 01-03-2005 09:42 PM

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.

leonscape 01-03-2005 11:39 PM

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.

Draygo 01-03-2005 11:58 PM

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.

adityavpratap 01-04-2005 04:51 AM

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


All times are GMT -5. The time now is 04:22 PM.