红联Linux门户
Linux帮助

Ubuntu中软件包更新错误问题的解决方案

发布时间:2007-02-27 01:05:55来源:红联作者:wuhu911
  最近在ubuntu中更新软件包的时候碰到了一个问题,问题如下:

引用:
#sudo apt-get update
#sudo apt-get dist-upgrade
... ...
Reading package fields... Done
Reading package status... Done
Retrieving bug reports... 0% [0/27] W: end of file reached: php5
W: not in gzip format: python-pam
W: not in gzip format: libapache2-mod-php5
W: not in gzip format: mysql-common
W: not in gzip format: mysql-client-5.0
W: not in gzip format: libmagick9
W: not in gzip format: postgresql-doc-8.1
W: not in gzip format: mysql-server-5.0
W: not in gzip format: apt-utils
... E: Too many errors while retrieving bug reports
E: 子进程 if dpkg -s apt-listbugs | grep -q '^Status: .* ok installed'; then /usr/sbin/apt-listbugs apt || ( test $? -ne 10 || exit 10; echo 'Warning: apt-listbugs exited abnormally, hit enter key to continue.' 1>&2 ; read a < /dev/tty ); fi 返回一个错误代码 (10)
E: Failure running script if dpkg -s apt-listbugs | grep -q '^Status: .* ok installed'; then /usr/sbin/apt-listbugs apt || ( test $? -ne 10 || exit 10; echo 'Warning: apt-listbugs exited abnormally, hit enter key to continue.' 1>&2 ; read a < /dev/tty ); fi


  上网查了一下,原来这是很多人都碰到的一个问题,有人提议把http改成ftp就能解决问题,我是通过代理上网,访问不了ftp,所以这个方案我也没法测试。参考网上的方案并经过自己的摸索,发现主要是跟更新软件包所用的软件源有关,我的source.list中使用了ubuntu.cn99.com和cn.archive.ubuntu.com两个源,我把后面的源注释掉,只使用cn99作为更新源。dist-upgrade的时候还是出现了上面类似的错误,但是warning变少了,多重试了几次后,就可以了,正常完成更新。希望碰到类似问题的朋友可以试试我的方法。
文章评论

共有 0 条评论