Apt Update 导致 Wireguard 出错

Apt Update 导致 Wireguard 出错

尝试运行 apt update 时出现以下错误:

sudo apt update
Hit:1 http://ro-mirrors.evowise.com/ubuntu focal InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 http://ro-mirrors.evowise.com/ubuntu focal-backports InRelease           
Hit:4 http://ro-mirrors.evowise.com/ubuntu focal-updates InRelease             
Hit:5 http://ppa.launchpad.net/bashtop-monitor/bashtop/ubuntu focal InRelease  
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease               
Hit:7 http://archive.canonical.com/ubuntu focal InRelease                
Hit:8 http://ppa.launchpad.net/cappelikan/ppa/ubuntu focal InRelease     
Err:9 http://ppa.launchpad.net/wireguard/wireguard/ubuntu focal InRelease
  403  Forbidden [IP: 91.189.95.83 80]
Reading package lists... Done                      
E: Failed to fetch http://ppa.launchpad.net/wireguard/wireguard/ubuntu/dists/focal/InRelease  403  Forbidden [IP: 91.189.95.83 80]
E: The repository 'http://ppa.launchpad.net/wireguard/wireguard/ubuntu focal InRelease' is no longer 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.

有什么指示吗?自从上周运行该命令以来,我没有改变任何东西(工作机器,因此周末我没有使用它)。

一般信息:XPS13 | Ubuntu 20.04 | 5.7.1 内核 | Gnome 3.36.3

答案1

所提及的PPA 所有者不再提供包裹。

您必须通过以下方式将其删除

sudo apt-add-repository -r ppa:wireguard/wireguard

相反,你必须添加宇宙放入口袋并安装包裹从中:

sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install wireguard

答案2

在链接中https://launchpad.net/~wireguard它说:

以前,它负责在 Ubuntu 上为 WireGuard 生成 PPA。该功能现已被纳入 Ubuntu 本身,因此我们已删除旧 PPA。只需apt install wireguard在所有 Ubuntu ≥ 16.04 上运行即可。

每个 apt-get update 命令都尝试获取软件包信息,但由于软件包已被删除而失败。使用以下命令从系统中删除 ppa 后,错误应该会消失:

sudo add-apt-repository --remove ppa:wireguard/wireguard

此外,如果软件包在 ubuntu 的官方档案镜像上可用,通常建议避免使用 PPA,除非您需要不同的版本。

答案3

对我来说,现有的答案不起作用,因为我仍然收到错误apt-get update。我需要通过删除以下文件来手动删除源/etc/apt/sources.list.d/

root@ubuntu-p:~# grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic main universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-security main universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates main
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates universe
/etc/apt/sources.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
/etc/apt/sources.list:# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:deb http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:deb http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save:# deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main
root@ubuntu-p:~# ls /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list  /etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list.save

root@ubuntu-p:~# rm /etc/apt/sources.list.d/*wireguard*

root@ubuntu-p:~# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
root@ubuntu-p:~#

相关内容