1.3 树莓派软件源及系统源设置

一 、软件源设置

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

1

sudo nano /etc/apt/sources.list

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

1

2

deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ buster main contrib non-free

deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ buster main contrib non-free

注:网址末尾的raspbian重复两次是必须的。因为Raspbian的仓库中除了APT软件源还包含其他代码。APT软件源不在仓库的根目录,而在raspbian/子目录下。

stretch 系统用以下内容取代:

1

2

deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free

deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free

jessie 用以下内容取代:

1

2

deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ jessie main contrib non-free

deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ jessie main contrib non-free

wheezy 用以下内容取代:

1

2

deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free

deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free

Ctrl+o 保存,之后回车确认,然后 Ctrl+x 退出。

二、编辑系统源配置

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

1

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

2、同样修改首行网址,修改后文件如下:

1

2

3

deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui

# Uncomment line below then 'apt-get update' to enable 'apt-get source'

#deb-src http://archive.raspberrypi.org/debian/ stretch main ui

jessie、wheezy 版本的系统按照之前修改软件源的的规则修改即可,这里不再赘述。
Ctrl+o 保存,之后回车确认,然后 Ctrl+x 退出。

三、升级软件

    sudo apt-get update

    sudo apt-get upgrade

四、常用软件源目录

 

中国科学技术大学
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/

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值