树莓派3B+ apt-get update 出错记录
sudo apt-get update 出错:
1 | E: 无法下载 http://101.44.1.125/files/B11600000762A811/mirrors.zju.edu.cn/debian/dists/stretch/main/binary-armhf/Packages.gz Writing more data than expected (184092 > 174269) |
更镜像源地址为中国科技大学:
sudo nano /etc/apt/sources.list
原文件:
1
2
3deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
# deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi修改为:
1
2
3
4
5deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
# deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
# deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi注意实际上只是把网址变了,后面部分不变,因为我看到以前的系统后面部分是不一样的。
sudo nano /etc/apt/sources.list.d/raspi.list
原文件:1
2
3deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui修改为:
1
2
3
4
5deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui
deb-src http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui
# deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui
再次尝试更新:
sudo apt-get update
没问题。sudo apt-get upgrade
出错:
1
2
3
4
5
6
7
8
9
10
11
12
E: 无法下载 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/pool/main/f/ffmpeg/libavutil55_3.2.10-1~deb9u1+rpt2_armhf.deb Hash 校验和不符
Hashes of expected file:
- SHA256:7461952290100c547db476ac7e2b3b727808a12060b0811490b42f2ad5f014d0
- SHA1:f79cb9b0ccf2375268fa9f27d60e8b1032a2ad77 [weak]
- MD5Sum:97cebd03678913ec7777cdc09602460b [weak]
- Filesize:234328 [weak]
Hashes of received file:
- SHA256:39043f5c516b326e2ced462aa3429c117c29831773e77440888c033c611ee3d0
- SHA1:bf444ace211d2f455b9cee540055786e6fd6bb6b [weak]
- MD5Sum:e6b2bd3e40e2c90651562ff882aa7d3f [weak]
- Filesize:234328 [weak]
Last modification reported: Wed, 01 Aug 2018 11:56:50 +0000
1
E: 无法下载 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/pool/main/f/ffmpeg/libavcodec57_3.2.10-1~deb9u1+rpt2_armhf.deb 无法发起与 mirrors.ustc.edu.cn:80 (2001:da8:d800:95::110) 的连接 - connect (101: 网络不可达) [IP: 2001:da8:d800:95::110 80]
再次修改配置
怀疑是/etc/apt/sources.list和/etc/apt/sources.list.d/raspi.list里面配置的源不一致,网上查了下sources.list.d目录下是配置第三方软件源。部里面内容全部注释掉,再次更新:sudo apt-get update
有很多更新sudo apt-get upgrade
没有任何软件升级,不知道对不对,但是至少没有错误了:
1 | 正在读取软件包列表... 完成 |