树莓派自带的软件源是
1 |
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi |
由于网站在国外,导致下载速度非常慢,因此需要修改为国内镜像站点即可。
Raspberry Pi
(树莓派)国内软件源:
修改配置文件
1 2 3 4 |
pi@raspberrypi ~ $ vi /etc/apt/sources.list deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi |
推荐使用如下命令直接替换成国内源(中科大的服务器):
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.old $ sudo sed -i "s/mirrordirector.raspbian.org/mirrors.ustc.edu.cn\/raspbian/g" /etc/apt/sources.list # 树莓派3B的源 $ sudo sed -i "s/archive.raspberrypi.org/mirrors.ustc.edu.cn\/raspbian/g" /etc/apt/sources.list #树莓派2代的源 $ sudo sed -i "s/raspbian.raspberrypi.org/mirrors.ustc.edu.cn\/raspbian/g" /etc/apt/sources.list $ sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.old $ sudo sed -i "s/^deb http:\/\/archive.raspberrypi.org\/debian/#deb http:\/\/archive.raspberrypi.org\/debian/g" /etc/apt/sources.list.d/raspi.list |