pve 是基于debain的一个linux 虚拟化平台,可以实现创建虚拟机。
问题:
Failed to fetch xxxxxxx
E: Failed to fetch http://ftp.debian.org/debian/pool/main/p/postfix/postfix_3.5.13-0%2bdeb11u1_amd64.deb Temporary failure resolving 'ftp.debian.org'
E: Failed to fetch http://ftp.debian.org/debian/pool/main/p/procmail/procmail_3.22-26%2bdeb11u1_amd64.deb Temporary failure resolving 'ftp.debian.org'
E: Failed to fetch http://ftp.debian.org/debian/pool/main/t/tcpdump/tcpdump_4.99.0-2%2bdeb11u1_amd64.deb Temporary failure resolving 'ftp.debian.org'
E: Failed to fetch http://security.debian.org/pool/updates/main/libx/libxslt/xsltproc_1.1.34-4%2bdeb11u1_amd64.deb Temporary failure resolving 'ftp.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
1、 先修改国内源
vi /etc/apt/sources.list
需要自己更具当前的PVE版本切换源的版本
如下 buster为版本
deb http://security.debian.org buster/updates main contrib
则需要将 bullseye改为buster
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
加入下边更新源,自行更改版本号
# security updates
#deb http://security.debian.org buster/updates main contrib
# 默认源可以注释掉
# debian aliyun source
deb https://mirrors.aliyun.com/debian buster main contrib non-free
deb https://mirrors.aliyun.com/debian buster-updates main contrib non-free
deb https://mirrors.aliyun.com/debian-security buster/updates main contrib non-free
# proxmox source
# deb http://download.proxmox.com/debian/pve buster pve-no-subscription
deb https://mirrors.ustc.edu.cn/proxmox/debian/pve buster pve-no-subscription
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
如果你没有订阅 Proxmox VE 企业版,可以将企业版软件源配置信息在软件源配置文件中注释掉(在该行开头插入一个 # 字符),以避免系统发出错误提示信息。这种情况下可以配置使用 pve-no-subscriptin 软件源。因为没有订阅 Proxmox VE 企业版服务,所以这里对Proxmox VE 企业版更新源进行注释操作。
vi /etc/apt/sources.list.d/pve-enterprise.list
注释掉下边代码
#deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
2、 配置DNS 服务器
vi /etc/resolv.conf
写入下边dns服务器
#设置首选dns
nameserver 114.114.114.114
#设置备用dns
nameserver 8.8.8.8
重启网络配置让其生效。
sudo service networking restart
3、 执行更新或者安装软件依赖
执行更新源
apt update
若是仍然报错,不能更新或安装;先删除 /var/lib/apt/lists/partial 目录下的所有文件,然后运行apt-get update。
cd /var/lib/apt/lists/partial
rm ./*
apt-get update
如需升级pve,则执行该命令
apt update && apt dist-upgrade -y
更新已安装的包
apt upgrade
安装软件或依赖
apt-get install vim -y