【树莓派】使用sudo apt-get update && sudo apt-get upgrade速度太慢怎么办

执行 sudo apt-get update && apt-get upgrade 遇到速度慢的方法: 使用国内软件源

将源换为国内环境即可,我选择阿里云

步骤

1.备份为 sources.list

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

2.编辑sources.list 文件

sudo vim /etc/apt/sources.list

3.使用#注释原来的内容,并添加以下内容

阿里源

deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi

或者(清华源)

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

或者(东软源)

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

或者(中科大源)

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

4.更新系统软件 并 更新已安装的包

sudo apt-get update && apt-get upgrade -y

你可能感兴趣的:(树莓派,linux,ubuntu)