LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2075|回复: 1

[解决] apt-get 出了问题

[复制链接]
发表于 2008-12-29 21:58:45 | 显示全部楼层 |阅读模式
上周三网络非常慢,在 apt-get update 时下载超时了。周四网速恢复后再 apt-get update 就一直报错,错误如下:

sudo apt-get update
获取:1 http://security.debian.org etch/updates Release.gpg [189B]            
获取:2 http://ftp.debian.org etch Release.gpg [386B]
命中 http://security.debian.org etch/updates Release
命中 http://ftp.debian.org etch Release      
忽略 http://security.debian.org etch/updates/main Packages/DiffIndex
忽略 http://ftp.debian.org etch/main Packages/DiffIndex
忽略 http://security.debian.org etch/updates/contrib Packages/DiffIndex
忽略 http://security.debian.org etch/updates/main Sources/DiffIndex
忽略 http://security.debian.org etch/updates/contrib Sources/DiffIndex
命中 http://security.debian.org etch/updates/main Packages
忽略 http://ftp.debian.org etch/non-free Packages/DiffIndex
忽略 http://ftp.debian.org etch/contrib Packages/DiffIndex
忽略 http://ftp.debian.org etch/main Sources/DiffIndex
忽略 http://ftp.debian.org etch/non-free Sources/DiffIndex
忽略 http://ftp.debian.org etch/contrib Sources/DiffIndex
命中 http://security.debian.org etch/updates/contrib Packages
忽略 http://ftp.debian.org etch/main Packages
命中 http://security.debian.org etch/updates/main Sources
命中 http://security.debian.org etch/updates/contrib Sources
命中 http://ftp.debian.org etch/non-free Packages
命中 http://ftp.debian.org etch/contrib Packages
命中 http://ftp.debian.org etch/main Sources
命中 http://ftp.debian.org etch/non-free Sources
命中 http://ftp.debian.org etch/contrib Sources
获取:3 http://ftp.debian.org etch/main Packages [5620kB]
99% [3 Packages gzip 0]            
gzip: stdin: not in gzip format
错误 http://ftp.debian.org etch/main Packages
  子进程 gzip 返回了一个错误号 (1)
下载 3B,耗时 4s (1B/s)
无法下载 http://ftp.debian.org/debian/dis ... ry-i386/Packages.gz   子进程 gzip 返回了一个错误号 (1)
正在读取软件包列表... 完成
E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。


我使用源:

cat /etc/apt/sources.list
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
deb http://ftp.debian.org/debian etch main non-free contrib
deb-src http://ftp.debian.org/debian etch main non-free contrib


虽然报错中提示 Packages.gz 无法下载,但我手动 wget 是能成功的。

有谁知道这个问题该怎么解决吗?
 楼主| 发表于 2008-12-29 22:15:25 | 显示全部楼层
解决了,执行下面的命令
rm /var/lib/apt/lists/partial/*
后再 apt-get update 就没问题了。

参考: http://ubuntuforums.org/archive/index.php/t-427.html


PS:
之前 google 时使用的关键字
debian E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。

并没有搜索出有用信息,刚才偶然试了试用另一个关键字
apt-get gzip: stdin: not in gzip format

第一个搜索结果就有有答案……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表