树莓派:配置软件源

树莓派:配置软件源

1、备份

在配置软件源之前,先备份,用于之后配置失败还原。

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak

2、编辑软件源配置

1、编辑 /etc/apt/sources.list 文件(软件源),参考如下命令:

sudo nano /etc/apt/sources.list

2、删除原文件所有内容,buster 系统用以下内容取代:

deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

3、编辑系统源配置

1、编辑/etc/apt/sources.list.d/raspi.list 文件(系统更新源),参考如下命令:

sudo nano /etc/apt/sources.list.d/raspi.list

2、删除原文件所有内容,buster 系统用以下内容取代:

deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main

4、更新

#更新软件源列表
sudo apt-get update
#更新软件版本
sudo apt-get upgrade
sudo apt-get dist-upgrade
#更新系统内核
sudo rpi-update

5、树莓派国内源

除了清华相关软件源,也可使用下面的国内源

#中国科学技术大学
Raspbian http://mirrors.ustc.edu.cn/raspbian/raspbian/

#阿里云
Raspbian http://mirrors.aliyun.com/raspbian/raspbian/

#清华大学
Raspbian http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/

#华中科技大学
Raspbian http://mirrors.hustunique.com/raspbian/raspbian/
Arch Linux ARM http://mirrors.hustunique.com/archlinuxarm/

#华南农业大学(华南用户)
Raspbian http://mirrors.scau.edu.cn/raspbian/

#大连东软信息学院源(北方用户)
Raspbian http://mirrors.neusoft.edu.cn/raspbian/raspbian/

#重庆大学源(中西部用户)
Raspbian http://mirrors.cqu.edu.cn/Raspbian/raspbian/

#中山大学 已跳转至中国科学技术大学源
Raspbian http://mirror.sysu.edu.cn/raspbian/raspbian/

#新加坡国立大学
Raspbian http://mirror.nus.edu.sg/raspbian/raspbian

#牛津大学
Raspbian http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/

#韩国KAIST大学
Raspbian http://ftp.kaist.ac.kr/raspbian/raspbian/
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章