ubuntu20.04 execute sudo apt-get update error E: Failed to fetch https://mirrors.ustc.edu.cn/ubuntu/dists/f

Ubuntu Ports source usage help 
address 
https://mirrors.ustc.edu.cn/ubuntu-ports/

Description 
Ubuntu Software Sources

Included architecture
arm64, armhf, PowerPC, ppc64el, s390x

Included versionAll
versions of Ubuntu currently supported by the architecture, including the development version

For versions that are no longer supported by Ubuntu, please refer to the Ubuntu Old Releases source usage help

Instructions for useManually
change the configuration file: sudo vi /etc/apt/sources.list

Please make a backup before operation

In the /etc/apt/sources.list file, change the address of the software source to http://mirrors.ustc.edu.cn/ubuntu-ports

The following is the reference configuration content of Ubuntu 22.04 /etc/apt/sources.list file:

# 默认注释了源码仓库,如有需要可自行取消注释
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy main main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse

After changing the sources.list file, please run sudo apt-get update to update the index to take effect.

For other versions, replace jammy with other version codes: 22.04: jammy; 20.04: focal; 18.04: bionic; 16.04: xenial; 14.04: trusty.
Reference article: http://cmcc.mirrors.ustc.edu.cn/help/ubuntu.html

Guess you like

Origin blog.csdn.net/weixin_47068446/article/details/130631714