【树莓派】更新软件源之后更新报错

问题
即使更新了可访问的软件源,在使用

sudo apt-get update

的时候仍然会出现一些错误

Err http://archive.raspberrypi.org jessie InRelease                            
Err http://archive.raspberrypi.org jessie Release.gpg
Could not resolve 'archive.raspberrypi.org'
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/InRelease  

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/Release.gpg  Could not resolve 'archive.raspberrypi.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法
编辑 /etc/resolv.conf文件

sudo vim /etc/resolv.conf

如果你发现里面存在诸如

nameserver 192.168.199.1

这样的局域网静态IP,你需要修改为一些常见的DNS服务器IP,如114.114.114.114

你可能感兴趣的:(树莓派,树莓派,更新,报错)