Ubuntu 配置源列表sources.list

2020-11-21  本文已影响0人  DarcyZhou

在Ubuntu中使用命令下载软件出现sources.list配置错误的问题,比如执行命令:

sudo apt-get install git

出现错误:

忽略:1 http://mirrors.aliyun.com/ubuntu disco InRelease
忽略:2 http://mirrors.aliyun.com/ubuntu disco-security InRelease
忽略:3 http://mirrors.aliyun.com/ubuntu disco-updates InRelease
忽略:4 http://mirrors.aliyun.com/ubuntu disco-backports InRelease
忽略:5 http://mirrors.aliyun.com/ubuntu disco-proposed InRelease
错误:6 http://mirrors.aliyun.com/ubuntu disco Release
404 Not Found [IP: 117.91.177.241 80]
错误:7 http://mirrors.aliyun.com/ubuntu disco-security Release
404 Not Found [IP: 117.91.177.241 80]
错误:8 http://mirrors.aliyun.com/ubuntu disco-updates Release
404 Not Found [IP: 117.91.177.241 80]
错误:9 http://mirrors.aliyun.com/ubuntu disco-backports Release
404 Not Found [IP: 117.91.177.241 80]
错误:10 http://mirrors.aliyun.com/ubuntu disco-proposed Release
404 Not Found [IP: 117.91.177.241 80]
正在读取软件包列表... 完成
E: 仓库 “http://mirrors.aliyun.com/ubuntu disco Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.aliyun.com/ubuntu disco-security Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.aliyun.com/ubuntu disco-updates Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.aliyun.com/ubuntu disco-backports Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.aliyun.com/ubuntu disco-proposed Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

解决方法:更新源列表

1.备份原来的源列表

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

2.获取最新的源列表

下载对应版本最新的源列表:https://mirrors.ustc.edu.cn/repogen/,比如我的ubuntu19.04:

1605941445(1).png

3.修改源列表

将上面获取到的源列表复制粘贴到/etc/apt/sources.list。

sudo gedit /etc/apt/sources.list

4.更新源列表

sudo apt-get update

5.重新下载

配置完源列表后,再次重新执行下面的命令即可。

sudo apt-get install git
上一篇 下一篇

猜你喜欢

热点阅读