腾讯云TDP-树莓派3B(ubuntu 22.04 server)更换apt源

2022-04-25 10:44:19 浏览数 (1)

腾讯云TDP-树莓派3B(ubuntu 22.04 server)更换apt源

1.更换 /etc/apt/sources.list 里面的内容为下方配置(只用选腾讯或者中科大的就行 不要都写进去)

腾讯云源

代码语言:javascript复制
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy main restricted
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates main restricted
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy universe
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates universe
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy multiverse
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates multiverse
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security main restricted
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security universe
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security multiverse

中科大源

代码语言:javascript复制
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy main restricted
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-updates main restricted
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-updates universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-updates multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-security main restricted
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-security universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-security multiverse

原始配置备份

代码语言:javascript复制
deb http://ports.ubuntu.com/ubuntu-ports jammy main restricted
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted
deb http://ports.ubuntu.com/ubuntu-ports jammy universe
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates universe
deb http://ports.ubuntu.com/ubuntu-ports jammy multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports jammy-security universe
deb http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse

记得修改DNS

vim /etc/resolv.conf

代码语言:javascript复制
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 114.114.114.114
options edns0 trust-ad
search lan

0 人点赞