apt-get update 时出错

apt-get update 时出错

操作系统:Ubuntu 20.04。

root@la425:~# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Ign:2 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease                                                       
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease                                                     
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease                          
Hit:8 http://archive.ubuntu.com/ubuntu focal-security InRelease                                
Err:9 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu focal Release                     
  404  Not Found [IP: 91.189.95.83 80]
Hit:3 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu focal InRelease
Ign:7 https://downloads.mariadb.com/MaxScale/2.4/ubuntu focal InRelease
Hit:10 https://downloads.mariadb.com/Tools/ubuntu focal InRelease
Err:11 https://downloads.mariadb.com/MaxScale/2.4/ubuntu focal Release
  404  Not Found [IP: 104.20.67.208 443]
Reading package lists... Done
N: Ignoring file 'mariadb.list.old_1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'mariadb.list.old_2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: The repository 'http://ppa.launchpad.net/chris-lea/redis-server/ubuntu focal 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://downloads.mariadb.com/MaxScale/2.4/ubuntu focal 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.

答案1

根据 apt 进程的输出,似乎您手动添加了一些其他非官方存储库,这没问题。但这样做时,您必须确保它们支持您的操作系统风格,或者至少存在 dists。您不能只是添加focal并希望它能正常工作。

当手动浏览到 时https://downloads.mariadb.com/MaxScale/2.4/ubuntu,没有名为 的 dist focal,这解释了404 Not Found错误。 也是如此http://ppa.launchpad.net/chris-lea/redis-server/ubuntu

这个错误N: Ignoring file 'mariadb.list.old_1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension本身就有点说明问题了,应该修复。你可以在这里阅读更多关于管理你的源和仓库列表的信息:存储库/Ubuntu

相关内容