1. Check the Codename of the Ubuntu system
$ lsb_release -a
got the answer:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
Visit http://mirrors.aliyun.com/ubuntu/dists/ to see if Aliyuan supports
Modify sources.list
$ sudo vi /etc/apt/sources.list
Delete the sources.list
original content and replace it with Aliyuan
deb http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ artful-proposed main restricted universe multiverse
Note that the artful of each line here needs to correspond to the Codename of the system, so the sources.list
files between different system versions cannot be universal
Pay attention to version 17.10 . Although you can see it in http://mirrors.aliyun.com/ubuntu/dists/ , it is actually not usable.
Will report an error
dminz@u211 /etc/apt]$sudo apt-get update
Ign:1 http://mirrors.aliyun.com/ubuntu/dists artful InRelease
Ign:2 http://mirrors.aliyun.com/ubuntu/dists artful-security InRelease
Ign:3 http://mirrors.aliyun.com/ubuntu/dists artful-updates InRelease
Ign:4 http://mirrors.aliyun.com/ubuntu/dists artful-backports InRelease
Ign:5 http://mirrors.aliyun.com/ubuntu/dists artful-proposed InRelease
Err:6 http://mirrors.aliyun.com/ubuntu/dists artful Release
404 Not Found [IP: 183.240.176.117 80]
Err:7 http://mirrors.aliyun.com/ubuntu/dists artful-security Release
404 Not Found [IP: 183.240.176.117 80]
Err:8 http://mirrors.aliyun.com/ubuntu/dists artful-updates Release
404 Not Found [IP: 183.240.176.117 80]
Err:9 http://mirrors.aliyun.com/ubuntu/dists artful-backports Release
404 Not Found [IP: 183.240.176.117 80]
Err:10 http://mirrors.aliyun.com/ubuntu/dists artful-proposed Release
404 Not Found [IP: 183.240.176.117 80]
Reading package lists... Done
E: The repository 'http://mirrors.aliyun.com/ubuntu/dists artful 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.
E: The repository 'http://mirrors.aliyun.com/ubuntu/dists artful-security 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.
E: The repository 'http://mirrors.aliyun.com/ubuntu/dists artful-updates 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.
E: The repository 'http://mirrors.aliyun.com/ubuntu/dists artful-backports 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.
E: The repository 'http://mirrors.aliyun.com/ubuntu/dists artful-proposed 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.
The reason is that the non-mainstream version such as 17.10 is no longer supported. The solution is to look at the link . In simple terms, you need to change the domain name to old-releases.ubuntu.com
17.10 source actually
deb http://old-releases.ubuntu.com/ubuntu/ artful main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ artful main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ artful-security main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ artful-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ artful-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ artful-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ artful-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ artful-proposed main restricted universe multiverse
Update source
$ sudo apt-get update
Update software
$ sudo apt-get upgrade