各位大神求教,apt-get undate 报错

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
dinglei_ml
帖子: 7
注册时间: 2016-07-23 10:03
系统: ubuntu 16.04

各位大神求教,apt-get undate 报错

#1

帖子 dinglei_ml » 2016-07-23 11:03

电脑 win10,acer牌的。ubuntu是16.04版的

用sudo apt-get update 保留错误。。。


已下载 96.8 kB,耗时 2秒 (41.2 kB/s)
正在读取软件包列表... 完成
E: 无法下载 http://mirrors.sohu.com/debian/dists/st ... tion-zh_CN BZ2_bzread: /var/lib/apt/lists/partial/mirrors.sohu.com_debian_dists_stable_main_i18n_Translation-zh%5fCN.bz2 读错误 (-5: DATA_ERROR_MAGIC)
E: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。

这个错误是什么意思??不知道怎么解决 :Cry :Cry :Cry

万分感谢!!!
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 各位大神求教,apt-get undate 报错

#2

帖子 vickycq » 2016-07-23 12:26

dinglei_ml 写了:电脑 win10,acer牌的。ubuntu是16.04版的
E: 无法下载 http://mirrors.sohu.com/debian/dists/st ... tion-zh_CN BZ2_bzread:
系统是 Ubuntu 16.04 还是 Debian 8?若为 Ubuntu 16.04 请勿使用 Debian 8 软件源。
可将 /etc/apt/sources.list, /etc/apt/sources.list.d/* 中相关条目移除。若不清楚具体做法,执行以下指令将结果全部复制贴上来

代码: 全选

cat /etc/apt/sources.list
cat /etc/apt/sources.list.d/*
dinglei_ml 写了:/var/lib/apt/lists/partial/mirrors.sohu.com_debian_dists_stable_main_i18n_Translation-zh%5fCN.bz2 读错误 (-5: DATA_ERROR_MAGIC)
猜测 由于网络问题,下载到的文件错误。不过关键问题并不在于此
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
dinglei_ml
帖子: 7
注册时间: 2016-07-23 10:03
系统: ubuntu 16.04

Re: 各位大神求教,apt-get undate 报错

#3

帖子 dinglei_ml » 2016-07-23 16:14

大神

代码: 全选

E: 无法下载 http://mirrors.sohu.com/debian/dists/st ... tion-zh_CN BZ2_bzread: /var/lib/apt/lists/partial/mirrors.sohu.com_debian_dists_stable_main_i18n_Translation-zh%5fCN.bz2 读错误 (-5: DATA_ERROR_MAGIC)
好像是一个错误!!!

sources.list的内容是

代码: 全选

# Debian packages for stable
deb http://mirrors.sohu.com/debian/ stable main contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://mirrors.sohu.com/debian/ stable main contrib

# Security updates for stable
deb http://security.debian.org/ stable/updates main contrib



#deb http://archive.ubuntu.com/ubuntu xenial main universe




#deb cdrom:[Ubuntu-GNOME 16.04 LTS _Xenial Xerus_ - Release amd64 (20160421)]/ xenial main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

sources.list.d的内容是:

代码: 全选

google-chrome.list
google-chrome.list.save
kazam-team-ubuntu-stable-series-xenial.list
kazam-team-ubuntu-stable-series-xenial.list.save
kazam-team-ubuntu-unstable-series-xenial.list
kazam-team-ubuntu-unstable-series-xenial.list.save
sogoupinyin.list
sogoupinyin.list.save

万分感谢!!!
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 各位大神求教,apt-get undate 报错

#4

帖子 vickycq » 2016-07-23 18:06

其中包含有 debian stable 软件源条目,应移除
将 /etc/apt/sources.list 备份后移除,全部更换为以下内容

代码: 全选

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse

# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
保存后 执行

代码: 全选

sudo apt update
另建议回顾一下,以下这几行是怎么跑到 /etc/apt/sources.list 中的
# Debian packages for stable
deb http://mirrors.sohu.com/debian/ stable main contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://mirrors.sohu.com/debian/ stable main contrib

# Security updates for stable
deb http://security.debian.org/ stable/updates main contrib
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
dinglei_ml
帖子: 7
注册时间: 2016-07-23 10:03
系统: ubuntu 16.04

Re: 各位大神求教,apt-get undate 报错

#5

帖子 dinglei_ml » 2016-07-23 19:16

大神,你好!!!
我把那些东西删除之后,问题马上就解决的!!!
但是,那些镜像网站是我通过

代码: 全选

sudo netselect-apt stable
获得的。
看了官网关于ubuntu资料时,说可以通过netselect-apt得到 速度最快的镜像网站。。
不是这样的吗????

万分感谢大神!!!
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 各位大神求教,apt-get undate 报错

#6

帖子 vickycq » 2016-07-23 22:57

dinglei_ml 写了:看了官网关于ubuntu资料时,说可以通过netselect-apt得到 速度最快的镜像网站。。不是这样的吗?!
您如何安装的 netselect-apt? Ubuntu 软件源中并没有这款软件。
若要在 Ubuntu 中使用 netselect,参考 http://askubuntu.com/a/141536
根据网友反馈,此工具选择镜像源的依据是延时,因此未必能选到下载速度最高的镜像源。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
dinglei_ml
帖子: 7
注册时间: 2016-07-23 10:03
系统: ubuntu 16.04

Re: 各位大神求教,apt-get undate 报错

#7

帖子 dinglei_ml » 2016-07-24 17:51

我不知道怎么找到netselect-apt的.deb文件,下来下来,安装后,就可以用了!!!

想问一下,大神用的镜像网址还是ubuntu原先自带的吗???还是用163,或者sohu的???
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 各位大神求教,apt-get undate 报错

#8

帖子 vickycq » 2016-07-24 18:12

dinglei_ml 写了:找到netselect-apt的.deb文件,下来下来,安装后,就可以用了!!!
参考楼上链接正确使用。否则可能会错误地将 debian 源添加到 sources.list 中
既然已经测得搜狐镜像源连接比较顺畅,改为搜狐 ubuntu 镜像源即可。
dinglei_ml 写了:用的镜像网址还是ubuntu原先自带的吗???还是用163,或者sohu的???
根据所处地区决定。例如在北京地区用北京交大镜像源 20Mb 带宽通常可以跑满。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
回复