NanoPi NEO Ubuntu16.04更换国内源

	闲来无事用NanoPi NEO搭一个服务器,但是在更换国内源的时候出现了一些问题。
	Ubuntu默认源是国外源,使用时有点慢而且好像还有点莫名其妙的问题?所以打算换源。
	
	一、备份修改/etc/apt/sources.list
	cp /etc/apt/sources.list /etc/apt/sources.bak.list
	vim /etc/apt/sources.list
编辑sources.list,把里面的内容注释,更换国内清华源,链接如下
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
	#以16.04LTS为例
	# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
	deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
	# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
	deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
	# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
	deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
	# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
	deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
	# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

	# 预发布软件源,不建议启用
	# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
	# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
二、更新源
	sudo apt-get update
但是用国内清华源的时候有个问题
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial/main/binary-armhf/Packages  404  Not Found
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-updates/main/binary-armhf/Packages  404  Not Found
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-backports/main/binary-armhf/Packages  404  Not Found
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-security/main/binary-armhf/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

问题是404 not found 找不到网页,起初我以为是DNS的问题,修改/etc/resolv.conf 但是还是有问题,最后看源码的确是没这几个文件,所以是源的问题,换了国内其他几个常用源后还是有问题。
查资料后发现中科大还提供old_release

deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ zesty main universe 

###### Ubuntu Update Repos
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ zesty-updates main universe 

更换中科院的old_release后sudo apt-get update后就OK了

你可能感兴趣的:(NanoPi NEO Ubuntu16.04更换国内源)