E: The repository ‘http://extras.ubuntu.com/ubuntu xenial Release‘ does not have a Release file.

After UBUNTU replaces the mirror source,
execute
sudo apt-get update

The error is as follows:

Get:86 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [4588 B]
Reading package lists… Done
E: The repository ‘http://extras.ubuntu.com/ubuntu xenial Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Solution:

Edit the /etc/apt/sources.list file and add the Alibaba Cloud mirror source at the top of the file:

#  阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

Then run:

sudo rm -vf /var/lib/apt/lists/*
sudo apt clean
sudo apt update ; reboot

Guess you like

Origin blog.csdn.net/weixin_47542175/article/details/115368001