proxomx软件仓库无法使用解决

在尝试更新Proxmox系统时遇到问题,无法通过apt-get进行软件更新。根据官方文档,需要修改配置,包括备份原有软件清单,添加新仓库,导入密钥,然后更新仓库和软件。完成这些步骤后,系统能够正常更新,并在更新完毕后重启虚拟机,最终成功下载了vim工具。
摘要由CSDN通过智能技术生成

更新proxomx的软件

系统不能直接安装软件
proxmox的底层是个debian系统,刚安装系统是要更新一下的。
在shell中输入apt-get update && apt-get dist-upgrade,回车,发现报错无法更新。
查看官方文档发现需要更改一些设置,在shell输入

操作步骤如下:

1、检查软件软件无法更新

root@lhh:/etc/apt/sources.list.d# apt-get update
Hit:1 http://security.debian.org bullseye-security InRelease
Hit:2 http://ftp.debian.org/debian bullseye InRelease          
Hit:3 http://ftp.debian.org/debian bullseye-updates InRelease  
Err:4 https://enterprise.proxmox.com/debian/pve bullseye InRelease
  Could not connect to enterprise.proxmox.com:443 (51.79.159.216), connection timed out
Reading package lists... Done                            
N: Ignoring file 'pve-enterprise.list11' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/bullseye/InRelease  Could not connect to enterprise.proxmox.com:443 (51.79.159.216), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@lhh:/etc/apt/sources.list.d# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
N: Ignoring file 'pve-enterprise.list11' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
root@lhh:/etc/apt/sources.list.d#

2、备份原有的软件清单仓库

root@lhh:~# cd /etc/apt/sources.list.d/
root@lhh:/etc/apt/sources.list.d# ls
pve-enterprise.list
root@lhh:/etc/apt/sources.list.d# cat pve-enterprise.list
deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise
root@lhh:/etc/apt/sources.list.d# mv pve-enterprise.list pve-enterprise.list.bak

3、添加新的软件清单仓库

root@lhh:/etc/apt/sources.list.d# echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-enterprise.list

4、下载秘钥

root@lhh:~# wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
--2022-03-11 16:34:00--  http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg
Resolving download.proxmox.com (download.proxmox.com)... 51.79.159.216
Connecting to download.proxmox.com (download.proxmox.com)|51.79.159.216|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1181 (1.2K) [application/octet-stream]
Saving to:/etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg’
/etc/apt/trusted.gpg.d/proxmo 100%[================================================>]   1.15K  --.-KB/s    in 0s      
2022-03-11 16:34:05 (71.0 MB/s) -/etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg’ saved [1181/1181]
root@lhh:~#

5、更新仓库和软件

root@lhh:/etc/apt/sources.list.d# apt-get update
Get:1 http://security.debian.org bullseye-security InRelease [44.1 kB]
Get:2 http://security.debian.org bullseye-security/main amd64 Packages [122 kB]
Get:3 http://security.debian.org bullseye-security/main Translation-en [78.2 kB]
Get:4 http://ftp.debian.org/debian bullseye InRelease [116 kB] 
Get:5 http://ftp.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:6 http://ftp.debian.org/debian bullseye/main amd64 Packages [8,183 kB]
Get:7 http://ftp.debian.org/debian bullseye/main Translation-en [6,243 kB]
Get:8 http://ftp.debian.org/debian bullseye/contrib amd64 Packages [50.5 kB]                           
Get:9 http://ftp.debian.org/debian bullseye/contrib Translation-en [46.9 kB]                   
Get:10 http://ftp.debian.org/debian bullseye-updates/main amd64 Packages [2,596 B]                
Get:11 http://ftp.debian.org/debian bullseye-updates/main Translation-en [2,343 B]              
Get:12 http://download.proxmox.com/debian/pve stretch InRelease [3,052 B]                                             
Err:12 http://download.proxmox.com/debian/pve stretch InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0D9A1950E2EF0603
Reading package lists... Done
W: GPG error: http://download.proxmox.com/debian/pve stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0D9A1950E2EF0603
E: The repository 'http://download.proxmox.com/debian/pve stretch 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.

root@lhh:/etc/apt/sources.list.d# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  base-files bsdextrautils bsdutils chrony curl distro-info-data eject fdisk libblkid1 libcryptsetup12
  libcurl3-gnutls libcurl4 libexpat1 libfdisk1 libgmp10 libmount1 libnss3 libsasl2-2 libsasl2-modules-db libseccomp2
  libsmartcols1 libsmbclient libuuid1 libwbclient0 mount samba-common samba
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值