Ubuntu 16.04-无法运行软件更新或 apt-get-update

Ubuntu 16.04-无法运行软件更新或 apt-get-update

我正在运行 Ubuntu 16.04。几个月来我一直无法更新软件,因为我一直收到此消息。我尝试在服务器之间切换。但问题不大。尝试更新过期的密钥。仍然没有成功。请帮我解决这个问题。我甚至无法升级到较新版本的 Ubuntu 来修复它。什么都不起作用。

我还想知道这是否与软件更新中的“信任软件提供商”部分为空有关。以下是屏幕截图: 在此处输入图片描述

软件更新程序为我提供以下信息:

无法下载存储库信息。请检查您的互联网连接。

无法运行sudo-apt-get-update。我收到此消息:

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease 
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease                  
Hit:3 http://dl.google.com/linux/chrome/deb stable Release            
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease    
Hit:5 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease   
Hit:6 http://ppa.launchpad.net/gambas-team/gambas3/ubuntu xenial InRelease                               
Hit:7 http://archive.canonical.com/ubuntu wily InRelease                    
Ign:8 http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04 InRelease 
Hit:10 http://ppa.launchpad.net/i-nex-development-team/daily/ubuntu xenial InRelease 
Hit:11 http://ppa.launchpad.net/mjblenner/ppa-hal/ubuntu xenial InRelease 
Hit:12 http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04 Release 
Hit:13 http://ppa.launchpad.net/pipelight/stable/ubuntu xenial InRelease 
Hit:14 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial InRelease 
Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease 
Hit:16 https://deb.opera.com/opera-stable stable InRelease 
Err:17 http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04 Release.gpg   
The following signatures were invalid: KEYEXPIRED 1496576244 Reading package lists... Done  
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. 
GPG error: http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04 Release: The following signatures were invalid: KEYEXPIRED 1496576244
W: Failed to fetch http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/Release.gpg The following signatures were invalid: KEYEXPIRED 1496576244 
W: Some index files failed to download. They have been ignored, or old ones used instead.

http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/Release.gpg The following signatures were invalid: KEYEXPIRED 1496576244 
W: Some index files failed to download. They have been ignored, or old ones used instead.

然后我尝试更新密钥:

for K in $(apt-key list | grep expired | cut -d '/' -f2 | cut -d' '-f1); do sudo apt-key adv --recv-keys --keyserver keys.gnupg.net $K; done 

并输出:

Executing: /tmp/tmp.5NRsQ5oSoL/gpg.1.sh --recv-keys --keyserver keys.gnupg.net BEB6D886 gpg: requesting key BEB6D886 from hkp server keys.gnupg.net gpg: key BEB6D886: "home:Horst3180 OBS

Project <home:[email protected]>" not changed gpg: Total number processed: 1 gpg: unchanged: 1 Executing: /tmp/tmp.ctjucxHt4s/gpg.1.sh --recv-keys

--keyserver keys.gnupg.net F6D61D45 gpg: requesting key F6D61D45 from hkp server keys.gnupg.net gpg: key F6D61D45: "Opera Software Archive Automatic Signing Key 2015 <[email protected]>" 
not changed gpg: Total number processed: 1 gpg: unchanged: 1

答案1

您的 opensuse 存储库的 GPG 密钥已过期。

如果您不需要此源,请使用以下命令注释源条目:

sudo sed -i '/opensuse/ s/^/#/' /etc/apt/sources.list.d/*.list

并运行此命令删除过期的密钥:

sudo apt-key del 1496576244

然后运行此命令来更新存储库:

sudo apt update

相关内容