使用 Proxmox VE 默認的 APT 更新源,在 WEB 更新管理面板點擊“刷新”后,會顯示錯誤。這時因為默認的更新源為 Proxmox VE 企業版的訂閱,如果我們沒有購買訂閱,就會提示簽名錯誤,從而使得 APT 更新失敗,解決的辦法很簡單,就是更換軟件源就可以了。Proxmox 官方提供了對應不同版本的源,可以根據自己的情況進行選擇。
網上找的三種解決方法,原理都是替換軟件源,三種方法分別為:
方法1:
vim /etc/apt/sources.list.d/pve-enterprise.list
注釋掉:
# deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
然后:
echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
方法2:
編輯 sources.list,輸入以下命令:
nano /etc/apt/sources.list
打開后在最下面添加:
deb http://download.proxmox.com/debian buster pve-no-subscription
接着按 Ctrl+O 保存,按Ctrl+X退出。
編輯下pve-enterprise.list,輸入以下命令:
nano /etc/apt/sources.list.d/pve-enterprise.list
注釋掉 deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
然后保存退出。
方法3:
備份原來的 sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.bak
用下面的官方非訂閱源替換掉 sources.list 的內容
deb http://ftp.debian.org/debian buster main contrib deb http://ftp.debian.org/debian buster-updates main contrib # PVE pve-no-subscription repository provided by proxmox.com, # NOT recommended for production use deb http://download.proxmox.com/debian/pve buster pve-no-subscription # security updates deb http://security.debian.org buster/updates main contrib
注釋 /etc/apt/sources.list.d/pve-enterprise.list 中源地址
# deb https://enterprise.proxmox.com/debian/pve buster pve-enterpris
之后執行以下命令就可以正常升級了。
apt update && apt dist-upgrade
升級完成后,reboot重啟物理服務器,執行pveversion -v查看下最新的軟件版本。