Ubuntu 18.04 sudo apt-get 更新不工作

Ububtu 18.04 sudo apt-get update is not working

在我的系统 (ubuntu 18.04) 中执行 运行 sudo apt-get update 命令时出现以下错误,并且也无法安装任何新应用程序:-

$ sudo apt-get update
Hit:1 http://repo.mysql.com/apt/ubuntu bionic InRelease
Hit:2 http://linux.teamviewer.com/deb stable InRelease                         
Ign:3 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 InRelease      
Hit:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release        
Get:5 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.2/debian jessie InRelease [3,263 B]
Ign:6 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:7 https://repo.skype.com/deb stable InRelease                              
Hit:9 http://ppa.launchpad.net/flexiondotorg/hal-flash/ubuntu bionic InRelease 
Ign:11 http://extras.ubuntu.com/ubuntu trusty InRelease                        
Hit:12 http://security.ubuntu.com/ubuntu trusty-security InRelease             
Ign:13 http://archive.ubuntu.com/ubuntu artful InRelease                       
Ign:14 http://archive.canonical.com/ubuntu trusty InRelease                    
Err:5 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.2/debian jessie InRelease
  The following signatures were invalid: 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB
Hit:15 http://dl.google.com/linux/chrome/deb stable Release                    
Hit:17 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease     
Get:18 http://extras.ubuntu.com/ubuntu trusty Release [11.9 kB]                
Hit:19 http://archive.canonical.com/ubuntu trusty Release                      
Ign:20 http://archive.ubuntu.com/ubuntu artful-updates InRelease               
Get:22 http://extras.ubuntu.com/ubuntu trusty Release.gpg [72 B]               
Ign:23 http://archive.ubuntu.com/ubuntu artful-security InRelease              
Hit:25 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu bionic InRelease 
Hit:8 https://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu bionic InRelease
Ign:26 http://archive.ubuntu.com/ubuntu artful-backports InRelease             
Hit:28 http://archive.ubuntu.com/ubuntu bionic InRelease                       
Ign:29 https://dl.bintray.com/rabbitmq/debian bionic InRelease                 
Ign:22 http://extras.ubuntu.com/ubuntu trusty Release.gpg                      
Err:21 http://www.getdeb.net/ubuntu xenial-getdeb InRelease                    
  403  Forbidden [IP: 143.95.32.90 80]
Ign:30 http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu bionic InRelease       
Ign:31 http://archive.ubuntu.com/ubuntu trusty InRelease                       
Get:32 https://dl.bintray.com/rabbitmq/debian bionic Release [74.5 kB]         
Hit:33 http://archive.ubuntu.com/ubuntu trusty-updates InRelease               
Hit:16 https://downloads.mariadb.com/Tools/ubuntu bionic InRelease             
Hit:34 http://archive.ubuntu.com/ubuntu trusty-backports InRelease             
Hit:35 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease             
Hit:36 http://archive.ubuntu.com/ubuntu bionic-updates InRelease               
Hit:37 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu bionic InRelease          
Err:38 http://archive.ubuntu.com/ubuntu artful Release                         
  404  Not Found [IP: 2001:67c:1360:8001::23 80]
Err:39 http://archive.ubuntu.com/ubuntu artful-updates Release                 
  404  Not Found [IP: 2001:67c:1360:8001::23 80]
Err:40 http://archive.ubuntu.com/ubuntu artful-security Release                
  404  Not Found [IP: 2001:67c:1360:8001::23 80]
Hit:41 http://ppa.launchpad.net/phpmyadmin/ppa/ubuntu bionic InRelease    
Err:43 http://archive.ubuntu.com/ubuntu artful-backports Release               
  404  Not Found [IP: 2001:67c:1360:8001::23 80]
Hit:44 http://archive.ubuntu.com/ubuntu trusty Release                         
Ign:45 http://ppa.launchpad.net/pmiller-opensource/ppa/ubuntu bionic InRelease
Hit:46 http://ppa.launchpad.net/umang/indicator-stickynotes/ubuntu bionic InRelease
Hit:48 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease       
Err:49 http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu bionic Release         
  404  Not Found [IP: 2001:67c:1560:8008::15 80]
Err:50 http://ppa.launchpad.net/pmiller-opensource/ppa/ubuntu bionic Release
  404  Not Found [IP: 2001:67c:1560:8008::15 80]
Reading package lists... Done                                
W: GPG error: http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.2/debian jessie InRelease: The following signatures were invalid: 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB
E: The repository 'http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.2/debian jessie InRelease' is not signed.
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.
W: GPG error: http://extras.ubuntu.com/ubuntu trusty Release: The following signatures were invalid: C47415DFF48C09645B78609416126D3A3E5C1192
E: The repository 'http://extras.ubuntu.com/ubuntu trusty Release' is not signed.
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: Failed to fetch http://archive.getdeb.net/ubuntu/dists/xenial-getdeb/InRelease  403  Forbidden [IP: 143.95.32.90 80]
E: The repository 'http://archive.getdeb.net/ubuntu xenial-getdeb InRelease' is not signed.
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.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu bionic InRelease' doesn't support architecture 'i386'
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://downloads.mariadb.com/Tools/ubuntu bionic InRelease' doesn't support architecture 'i386'
E: The repository 'http://archive.ubuntu.com/ubuntu 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://archive.ubuntu.com/ubuntu 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://archive.ubuntu.com/ubuntu 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://archive.ubuntu.com/ubuntu 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.
W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Packages (universe/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Packages (universe/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Translations (universe/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Translations (universe/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11 (universe/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11 (universe/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11-icons-small (universe/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11-icons (universe/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target CNF (universe/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target CNF (universe/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
E: The repository 'http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu bionic 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://ppa.launchpad.net/pmiller-opensource/ppa/ubuntu bionic 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.
W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Packages (universe/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Packages (universe/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Translations (universe/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target Translations (universe/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11 (universe/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11 (universe/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11-icons-small (universe/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target DEP-11-icons (universe/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target CNF (universe/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12
W: Target CNF (universe/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:12

请建议解决此问题需要执行的步骤。

在我的系统(ubuntu 18.04)中执行 运行 sudo apt-get update 命令时出现这些错误,并且也无法安装任何新应用程序。

尝试对它抱怨的资源执行 ping 操作,看看您是否能够得到响应。

我已经尝试 http://archive.ubuntu.com/ubuntu 并且可以很好地解决它,所以它可能与防火墙或代理相关。

因为你添加了很多PPA!

尝试从 /etc/apt/sources.list.d//etc/apt/sources.list 中删除所有这些 PPA,然后再次 运行 sudo apt update,然后一切都会正常。 (如果你想要/etc/apt/sources.list看看this link)

我应该提一下,添加那么多 PPA 是有风险的,您应该尽量避免! (除非有必要,请确保您添加的是安全的 ppa。)