今天用 pve 所在 debian 系统,apt install nut ,用于 ups 管理,发现报错
W: (pve-apt-hook) !! WARNING !!
W: (pve-apt-hook) You are attempting to remove the meta-package 'proxmox-ve'!
W: (pve-apt-hook)
W: (pve-apt-hook) If you really want to permanently remove 'proxmox-ve' from your system, run the following command
W: (pve-apt-hook) touch '/please-remove-proxmox-ve'
W: (pve-apt-hook) run apt purge proxmox-ve to remove the meta-package
W: (pve-apt-hook) and repeat your apt invocation.
W: (pve-apt-hook)
W: (pve-apt-hook) If you are unsure why 'proxmox-ve' would be removed, please verify
W: (pve-apt-hook) - your APT repository settings
W: (pve-apt-hook) - that you are using 'apt full-upgrade' to upgrade your system
E: Sub-process /usr/share/proxmox-ve/pve-apt-hook returned an error code (1)
E: Failure running script /usr/share/proxmox-ve/pve-apt-hook
后面经过一番搜索,才发现应该是收费订阅服务的问题,导致我现在用不了 apt 。
然后我就去网上搜了,按照网上文章 https://blog.51cto.com/sery/2178466 的评论:
这个问题解决了,方法如下; mkdir /usr/share/proxmox-ve && touch /usr/share/proxmox-ve/pve-apt-hook && chmod 0755 /usr/share/proxmox-ve/pve-apt-hook ## pve 6.x buster 版本 ## pve 7.x bullseye 版本 记得替换版本代号 echo "deb http://mirrors.ustc.edu.cn/proxmox/debian/pve/ bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-no-sub.list apt update && apt dist-upgrade
我进行了如下查看
root@pve:~# ls -l /etc/apt/sources.list.d/
total 8
-rw-r--r-- 1 root root 71 Dec 25 2022 pve-enterprise.list
-rw-r--r-- 1 root root 80 Dec 25 2022 pve-no-subscription.list
root@pve:~# cat /etc/apt/sources.list.d/pve-enterprise.list
#deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise
root@pve:~# cat /etc/apt/sources.list.d/pve-no-subscription.list
deb https://mirrors.ustc.edu.cn/proxmox/debian/pve bullseye pve-no-subscription
进行了如下备份操作,
root@pve:~# mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
root@pve:~# mv /usr/share/proxmox-ve/pve-apt-hook /usr/share/proxmox-ve/pve-apt-hook.bak
root@pve:~# cat /usr/share/proxmox-ve/pve-apt-hook
cat: /usr/share/proxmox-ve/pve-apt-hook: No such file or directory
root@pve:~# touch /usr/share/proxmox-ve/pve-apt-hook
root@pve:~# chmod 0755 /usr/share/proxmox-ve/pve-apt-hook
然后开始 apt install ,没想到 install 操作连带着 remove ,没仔细看直接同意 Y 了
root@pve:~# apt update
root@pve:~# apt install nut nut-server nut-client nut-cgi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
proxmox-mail-forward proxmox-offline-mirror-docs proxmox-offline-mirror-helper
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
apache2 apache2-bin apache2-data apache2-utils chrony gcc-12-base libabsl20220623 libaom3 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
libavif15 libc-bin libc-l10n libc6 libdav1d6 libgav1-1 libgd3 libgmp10 libgnutls-dane0 libgnutls30 libjansson4 libldap-2.5-0 libldap-common liblerc4 libltdl7
libnghttp2-14 libnutscan2 libpve-common-perl librav1e0 libsasl2-2 libsasl2-modules-db libssl3 libstdc++6 libsvtav1enc1 libtiff6 libupsclient6 libwebp7 libxpm4
libyuv0 libzstd1 locales proxmox-widget-toolkit
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser networkd-dispatcher glibc-doc libnss-nis libnss-nisplus libgd-tools dns-root-data
nut-monitor nut-i2c nut-ipmi nut-modbus nut-snmp nut-xml
Recommended packages:
libsasl2-modules
The following packages will be REMOVED:
libgnutlsxx28 lxc-pve proxmox-ve pve-container pve-ha-manager pve-manager qemu-server
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils gcc-12-base libabsl20220623 libaom3 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libavif15
libdav1d6 libgav1-1 libgd3 libldap-2.5-0 libldap-common liblerc4 libnutscan2 librav1e0 libssl3 libsvtav1enc1 libtiff6 libupsclient6 libwebp7 libxpm4 libyuv0
nut nut-cgi nut-client nut-server
The following packages will be upgraded:
chrony libc-bin libc-l10n libc6 libgmp10 libgnutls-dane0 libgnutls30 libjansson4 libltdl7 libnghttp2-14 libpve-common-perl libsasl2-2 libsasl2-modules-db
libstdc++6 libzstd1 locales proxmox-widget-toolkit
17 upgraded, 31 newly installed, 7 to remove and 582 not upgraded.
我没注意看
The following packages will be REMOVED:
libgnutlsxx28 lxc-pve proxmox-ve pve-container pve-ha-manager pve-manager qemu-server
然后就同意 Y 了,结果
Removing proxmox-ve (7.3-1) ...
Removing pve-manager (7.3-4) ...
Removing pve-ha-manager (3.5.1) ...
Removing pve-container (4.4-2) ...
Removing lxc-pve (5.0.0-3) ...
Removing 'diversion of /usr/share/apparmor-features/features to /usr/share/apparmor-features/features.stock by lxc-pve'
Removing libgnutlsxx28:amd64 (3.7.1-5+deb11u2) ...
Removing qemu-server (7.3-2) ...
现在开着的虚拟机不敢关了,pve 所在 debian 也不敢重启,pve web 肯定是登录不进去了,重新装也装不了。。
root@pve:~# apt install proxmox-ve
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
lxc-pve : Depends: libgnutlsxx28 but it is not installable
E: Unable to correct problems, you have held broken packages.
root@pve:~# apt install libgnutlsxx28
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libgnutlsxx28 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libgnutlsxx28' has no installation candidate
root@pve:~# qm
bash: qm: command not found
哪位朋友有时间帮忙解决一下,付费 100 以表谢意。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.