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

UBUNTU更换镜像源后
执行
sudo apt-get update

报错如下:

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.

解决办法:

编辑/etc/apt/sources.list文件, 在文件最前面添加阿里云镜像源:

#  阿里源
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

然后运行:

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

猜你喜欢

转载自blog.csdn.net/weixin_47542175/article/details/115368001