如何在 sudo apt-get update 命令期间停止 Virtual Box 错误?

如何在 sudo apt-get update 命令期间停止 Virtual Box 错误?

我使用的是 Kali 2023.4,并在其上安装了 VirtualBox。我不确定我是否做错了或者什么,但现在每当我运行命令时,sudo apt-get update除了其他更新之外,我还会得到以下响应。我只是想阻止它在每次运行命令时尝试。我尝试将所有虚拟盒包添加到apt-mark hold命令中,但它仍然可以。

如有任何帮助,我们将不胜感激,谢谢。

Get:1 https://download.virtualbox.org/virtualbox/debian bullseye InRelease [7735 B]
Err:1 https://download.virtualbox.org/virtualbox/debian bullseye InRelease      
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF
Hit:2 http://mirrors.ocf.berkeley.edu/kali kali-rolling InRelease      
Hit:3 https://repo.protonvpn.com/debian stable InRelease
Reading package lists... Done
W: GPG error: https://download.virtualbox.org/virtualbox/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF
E: The repository 'https://download.virtualbox.org/virtualbox/debian bullseye 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.

答案1

要修复该错误,您需要删除引用 download.virtualbox.org 中的条目/etc/apt/sources.list和 中的文件/etc/apt/sources.list.d

要安装VirtualBox,您不需要安装第三方存储库;包是在卡利可用:

sudo apt install virtualbox

相关内容