PVE 软件版更新报错,缺少公钥的解决办法

636 阅读1分钟

报错内容如下

W: GPG error: download.proxmox.com/debian/pve bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1140AF8F639E0C39 E: The repository 'download.proxmox.com/debian/pve bookworm 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. 添加社区版公钥

wget -qO - download.proxmox.com/debian/prox… | gpg --dearmor -o /usr/share/keyrings/proxmox-archive-keyring.gpg

 2. 编辑 APT 源列表: 你需要编辑 /etc/apt/sources.list 或 /etc/apt/sources.list.d/ 中的某个文件。 例如,你可以编辑 /etc/apt/sources.list 文件:

 nano /etc/apt/sources.list 

 3. 添加社区版源: 在文件中添加以下内容:

deb [signed-by=/usr/share/keyrings/proxmox-archive-keyring.gpg] download.proxmox.com/debian/pve bookworm pve-no-subscription

保存并退出编辑器: 如果使用 nano,按 Ctrl+O 保存,按 Enter 确认,然后按 Ctrl+X 退出。 

 4. 注释掉企业版源,如果已注释请忽略

nano /etc/apt/sources.list.d/pve-no-subscription.list

 5. 更新包列表: 运行以下命令以更新包列表:

apt update 

6. 安装或升级软件包: 现在你可以安装或升级软件包,例如:

apt full-upgrade