树莓派修改软件源的方法如下:
sudo nano /etc/apt/sources.list
打开后,用“#”将原来的注释掉,换上新的源即可。
# 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
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
修改后,按“Ctrl-O”保存,按“Ctrl-X”退出。
之后运行更新
sudo apt-get update