[SOLVED] I messed up. Upgrade 9.0

DigitalLF

New Member
Sep 11, 2024
9
1
3
I ran

Code:
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
apt update
apt upgrade

as soon as i ran it i knew i messed up..

So now i get this error:
Code:
568 upgraded, 173 newly installed, 86 to remove and 0 not upgraded.
Need to get 0 B/388 MB of archives.
After this operation, 26.4 MB disk space will be freed.
Do you want to continue? [Y/n]
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

while running
Code:
apt dist-upgrade

What can i do to fix this? I'm on "Virtual Environment 8.4.8" and did upgraded everything yesterday.
 
See the Upgrade wants to remove package 'proxmox-ve' section under Known Upgrade Issues in the later part of the guide: https://pve.proxmox.com/wiki/Upgrade_from_8_to_9

I'm sorry i forgot to tell you i tried that! I did not find it on the wiki but i found it in forum post.

Code:
root@pve:~# apt remove linux-image-amd64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'linux-image-amd64' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 568 not upgraded.
root@neo:~# apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  ceph-mgr-modules-core fonts-font-logos libc-ares2 libnet-subnet-perl libpython3.11 libsqlite3-mod-ceph proxmox-default-kernel pve-esxi-import-tools pve-nvidia-vgpu-helper python3-bs4 python3-cheroot python3-cherrypy3
  python3-dateutil python3-jaraco.classes python3-jaraco.collections python3-legacy-cgi python3-logutils python3-natsort python3-packaging python3-paste python3-pastedeploy python3-pastedeploy-tpl python3-pecan python3-portend
  python3-pytz python3-pyvmomi python3-simplegeneric python3-singledispatch python3-soupsieve python3-tempita python3-tempora python3-tz python3-waitress python3-webob python3-webtest python3-werkzeug python3-zc.lockfile
  virtiofsd
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  ceph ceph-base ceph-common ceph-mds ceph-mgr ceph-mon ceph-osd ceph-volume libarchive13 libcurl3-gnutls libcurl4 libdb5.3 libdbi1 libdw1 libefiboot1 libefivar1 libelf1 libevent-2.1-7 libevent-core-2.1-7 libext2fs2
  libgdbm-compat4 libgdbm6 libglib2.0-0 libgnutls-dane0 libgnutls30 libgnutlsxx30 libhogweed6 libipset13 libisns0 libmagic1 libmailutils9 libmpg123-0 libnettle8 libnpth0 libnvme1 liborc-0.4-0 libparted2 libpcap0.8 libpng16-16
  libprotobuf32 libproxmox-acme-perl libproxmox-rs-perl libpsl5 libpve-access-control libpve-cluster-api-perl libpve-cluster-perl libpve-common-perl libpve-guest-common-perl libpve-http-server-perl libpve-network-api-perl
  libpve-network-perl libpve-notify-perl libpve-rs-perl libpve-storage-perl libpve-u2f-server-perl librados2-perl librdmacm1 libreadline8 librrd8 libsmbclient libsnmp40 libssh2-1 libssl3 libtevent0 libtirpc3 liburcu8 libuv1
  libzfs4linux libzpool5linux lxc-pve proxmox-firewall proxmox-ve pve-cluster pve-container pve-firewall pve-ha-manager pve-manager pve-qemu-kvm python3-cephfs python3-distutils python3-lib2to3 python3-rados python3-rbd
  python3-rgw qemu-server spiceterm
The following NEW packages will be installed:
  build-essential cpp cpp-14 cpp-14-x86-64-linux-gnu cpp-x86-64-linux-gnu dkms dpkg-dev dracut-install fakeroot fonts-dejavu-mono fuse3 g++ g++-14 g++-14-x86-64-linux-gnu g++-x86-64-linux-gnu gcc gcc-14 gcc-14-base
  gcc-14-x86-64-linux-gnu gcc-x86-64-linux-gnu gir1.2-girepository-2.0 gir1.2-glib-2.0 grub-efi-amd64-unsigned ieee-data initramfs-tools-bin libaio1t64 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libapt-pkg7.0 libarchive13t64 libasan8 libassuan9 libatomic1 libc-dev-bin libc6-dev libcares2 libcbor0.10 libcc1-0 libcompel1 libcrypt-dev libcurl3t64-gnutls libcurl4t64 libdb5.3t64 libdbi1t64 libdrm-amdgpu1 libdrm-intel1
  libdw1t64 libefiboot1t64 libefivar1t64 libelf1t64 libevent-2.1-7t64 libevent-core-2.1-7t64 libext2fs2t64 libfakeroot libflac14 libfuse3-4 libgcc-14-dev libgdbm-compat4t64 libgdbm6t64 libgirepository-1.0-1 libglib2.0-0t64
  libglib2.0-data libgnutls-dane0t64 libgnutls30t64 libgomp1 libhogweed6t64 libhwasan0 libicu76 libio-compress-brotli-perl libipset13t64 libisl23 libisns0t64 libitm1 liblastlog2-2 libldap-common libldap2 libllvm19 liblsan0
  liblsof0 liblua5.4-0 libmagic1t64 libmailutils9t64 libmpc3 libmpfr6 libmpg123-0t64 libnettle8t64 libnghttp3-9 libngtcp2-16 libngtcp2-crypto-gnutls8 libnpth0t64 libnvme1t64 liborc-0.4-0t64 libparted2t64 libpcap0.8t64
  libpciaccess0 libperl5.40 libpng16-16t64 libprotobuf32t64 libpsl5t64 libpython3.13 libpython3.13-minimal libpython3.13-stdlib libquadmath0 librdmacm1t64 libreadline8t64 libreiserfscore0t64 librrd8t64 libsframe1 libsmbclient0
  libsnmp40t64 libssh2-1t64 libssl3t64 libstdc++-14-dev libsubid5 libtevent0t64 libtirpc3t64 libtlsrpt0 libtsan2 libubsan1 libunistring5 liburcu8t64 libuv1t64 libwtmpdb0 libxcb-dri3-0 libxcb-present0 libxcb-randr0 libxcb-sync1
  libxcb-xfixes0 libxshmfence1 libz3-4 libzfs6linux libzpool6linux linux-libc-dev linux-sysctl-defaults login.defs lsb-release make manpages-dev mesa-libgallium mokutil openssl-provider-legacy patch perl-modules-5.40
  publicsuffix python3-click python3-dbus python3-gi python3-legacy-cgi python3-linkify-it python3-markdown-it python3-mdurl python3-netaddr python3-pycriu python3-pygments python3-pytz python3-rich python3-typeguard
  python3-typing-extensions python3-uc-micro python3-zipp python3.13 python3.13-minimal rpcsvc-proto shim-helpers-amd64-signed shim-signed shim-signed-common shim-unsigned sqv systemd-boot-tools systemd-cryptsetup
  xdg-user-dirs zfs-dkms
The following packages will be upgraded:
  adduser apparmor apt apt-listchanges apt-utils attr base-files base-passwd bash bash-completion bc bind9-dnsutils bind9-host bind9-libs binutils binutils-common binutils-x86-64-linux-gnu bridge-utils bsd-mailx bsdextrautils
  bsdutils btrfs-progs busybox bzip2 ca-certificates chrony cifs-utils console-setup console-setup-linux coreutils cpio criu cron cron-daemon-common cryptsetup-bin curl dash dbus dbus-bin dbus-daemon dbus-session-bus-common
  dbus-system-bus-common debconf debconf-i18n debian-archive-keyring debian-faq debianutils diffutils dirmngr distro-info-data dmeventd dmidecode dmsetup dosfstools dpkg dtach e2fsprogs ebtables efibootmgr eject ethtool
  faketime fdisk fdutils file findutils fontconfig fontconfig-config fonts-dejavu-core fonts-glyphicons-halflings frr frr-pythontools fuse gcc-12-base gdisk genisoimage gettext-base glusterfs-client glusterfs-common gnupg
  gnupg-l10n gnupg-utils gnutls-bin gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep groff-base grub-common grub-efi-amd64 grub-efi-amd64-bin grub-pc-bin grub2-common gsasl-common guile-3.0-libs gzip hdparm
  hostname inetutils-telnet init init-system-helpers initramfs-tools initramfs-tools-core iperf iproute2 ipset iptables iputils-arping iputils-ping isc-dhcp-client isc-dhcp-common iso-codes kbd keyboard-configuration keyutils
  klibc-utils kmod krb5-locales less libacl1 libanyevent-perl libapparmor1 libappconfig-perl libapt-pkg-perl libargon2-1 libasound2-data libasyncns0 libattr1 libaudit-common libaudit1 libauthen-pam-perl libavahi-client3
  libavahi-common-data libavahi-common3 libbabeltrace1 libbinutils libblas3 libblkid1 libbpf1 libbrotli1 libbsd0 libbz2-1.0 libc-ares2 libc-bin libc-l10n libc6 libcairo2 libcap-ng0 libcap2 libcap2-bin libclone-perl libcom-err2
  libcommon-sense-perl libconvert-asn1-perl libcrypt-openssl-bignum-perl libcrypt-openssl-random-perl libcrypt-openssl-rsa-perl libcrypt-ssleay-perl libcrypt1 libcryptsetup12 libctf-nobfd0 libctf0 libdatrie1 libdbus-1-3
  libdebconfclient0 libdevmapper-event1.02.1 libdevmapper1.02.1 libdigest-hmac-perl libdouble-conversion3 libdpkg-perl libdrm-common libdrm2 libedit2 libepoxy0 libexpat1 libfaketime libfdisk1 libfdt1 libffi8 libfido2-1
  libfile-chdir-perl libfile-fcntllock-perl libfile-find-rule-perl libfile-listing-perl libfilesys-df-perl libfontconfig1 libfreetype6 libfribidi0 libfstrm0 libgbm1 libgc1 libgcc-s1 libgcrypt20 libgfapi0 libgfchangelog0
  libgfrpc0 libgfxdr0 libglusterfs0 libgmp10 libgpg-error0 libgprofng0 libgraphite2-3 libgsasl18 libgssapi-krb5-2 libgssglue1 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libharfbuzz0b libhtml-parser-perl
  libhtml-tagset-perl libhttp-cookies-perl libhttp-date-perl libhttp-message-perl libibverbs1 libidn12 libidn2-0 libinih1 libio-socket-ssl-perl libio-stringy-perl libip4tc2 libip6tc2 libiscsi7 libjansson4 libjemalloc2
  libjpeg62-turbo libjs-bootstrap libjson-c5 libjson-glib-1.0-0 libjson-glib-1.0-common libjson-xs-perl libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 libksba8 libldb2 liblinear4 liblinux-inotify2-perl
  liblmdb0 liblocale-gettext-perl liblockfile-bin liblockfile1 libltdl7 liblua5.3-0 liblvm2cmd2.03 liblwp-protocol-https-perl liblz4-1 liblzma5 liblzo2-2 libmagic-mgc libmariadb3 libmaxminddb0 libmd0 libmnl0 libmount1
  libmp3lame0 libncurses6 libncursesw6 libnet-dbus-perl libnet-dns-perl libnet-http-perl libnet-ip-perl libnet-ssleay-perl libnet1 libnetaddr-ip-perl libnetfilter-conntrack3 libnetfilter-log1 libnewt0.52 libnfnetlink0
  libnfsidmap1 libnftables1 libnftnl11 libnghttp2-14 libnl-3-200 libnl-route-3-200 libnsl2 libnspr4 libnss-systemd libnss3 libntlm0 libnuma1 libnvpair3linux libogg0 libopeniscsiusr libopus0 libp11-kit0 libpam-modules
  libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpci3 libpcre2-16-0 libpcre2-8-0 libpipeline1 libpixman-1-0 libpopt0 libposix-strptime-perl libpq5 libproc2-0
  libprotobuf-c1 libpulse0 libpython3-stdlib libqb100 libqrencode4 librabbitmq4 librdkafka1 librrds-perl librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libselinux1 libsemanage-common libsemanage2
  libsensors-config libsensors5 libsepol2 libslang2 libslirp0 libsmartcols1 libsnappy1v5 libsndfile1 libsnmp-base libsocket6-perl libspice-server1 libsqlite3-0 libss2 libstdc++6 libsystemd-shared libsystemd0 libtalloc2
  libtasn1-6 libtdb1 libtemplate-perl libterm-readline-gnu-perl libtext-charwidth-perl libtext-iconv-perl libthai-data libthai0 libtinfo6 libtirpc-common libtry-tiny-perl libu2f-server0 libuchardet0 libudev1 libunbound8
  libunwind8 liburi-perl liburing2 libusb-1.0-0 libuuid-perl libuuid1 libuutil3linux libva-drm2 libva2 libvirglrenderer1 libvorbis0a libvorbisenc2 libvulkan1 libwayland-server0 libwbclient0 libwrap0 libwww-perl libx11-6
  libx11-data libx11-xcb1 libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxdp1 libxext6 libxml-libxml-perl libxml-parser-perl libxml-sax-perl libxml-twig-perl libxml2 libxrender1 libxslt1.1 libxtables12 libxxhash0
  libyaml-0-2 libyaml-libyaml-perl libyang3 libzstd1 linux-base lldpd locales login logrotate logsave lsof lua-lpeg lvm2 lxcfs mailcap mailutils mailutils-common man-db manpages mariadb-common mawk media-types memtest86+ mount
  mysql-common nano ncurses-base ncurses-bin ncurses-term netbase netcat-traditional nfs-common nftables nmap nmap-common nvme-cli open-iscsi openssh-client openssh-server openssh-sftp-server openssl openvswitch-common
  openvswitch-switch parted passwd pci.ids pciutils perl perl-base perl-openssl-defaults pinentry-curses postfix postfix-pcre procmail procps psmisc python-apt-common python3 python3-apt python3-autocommand python3-bcrypt
  python3-bs4 python3-certifi python3-cffi-backend python3-chardet python3-charset-normalizer python3-cheroot python3-cherrypy3 python3-cryptography python3-dateutil python3-debconf python3-debian python3-debianbts
  python3-httplib2 python3-idna python3-inflect python3-jaraco.classes python3-jaraco.collections python3-jaraco.context python3-jaraco.functools python3-jaraco.text python3-jwt python3-logutils python3-mako python3-markupsafe
  python3-minimal python3-more-itertools python3-netifaces python3-openssl python3-openvswitch python3-packaging python3-paste python3-pastedeploy python3-pastedeploy-tpl python3-pecan python3-pkg-resources python3-portend
  python3-prettytable python3-protobuf python3-pycurl python3-pyparsing python3-pyvmomi python3-reportbug python3-requests python3-setuptools python3-six python3-soupsieve python3-systemd python3-tempita python3-tempora
  python3-tz python3-urllib3 python3-waitress python3-wcwidth python3-webob python3-webtest python3-werkzeug python3-yaml python3-zc.lockfile qrencode readline-common reportbug rpcbind rrdcached rsync runit-helper samba-common
  samba-libs sed sensible-utils sgml-base shared-mime-info smartmontools smbclient socat sqlite3 ssh ssl-cert strace sudo systemd systemd-boot systemd-boot-efi systemd-sysv sysvinit-utils tar tasksel tasksel-data tcpdump
  thin-provisioning-tools traceroute tzdata ucf udev uidmap usbutils usrmerge util-linux util-linux-extra uuid-runtime vim-common vim-tiny virtiofsd wamerican wget whiptail xfsprogs xkb-data xsltproc xz-utils zfs-initramfs
  zfs-zed zfsutils-linux zlib1g zstd
568 upgraded, 173 newly installed, 86 to remove and 0 not upgraded.
Need to get 0 B/388 MB of archives.
After this operation, 26.4 MB disk space will be freed.
Do you want to continue? [Y/n]
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
root@pve:~#

It's still not working. I feel kinda lost.
 
Hi!

Then bypass it:
Code:
$> mv "/usr/share/proxmox-ve/pve-apt-hook" "/usr/share/proxmox-ve/pve-apt-hook_old"
$> touch  /usr/share/proxmox-ve/pve-apt-hook
$> chmod u+x /usr/share/proxmox-ve/pve-apt-hook

$> apt update
$> apt dist-upgrade
 
Last edited:
  • Like
Reactions: DigitalLF
Hi!

Then bypass it:
Code:
$> mv "/usr/share/proxmox-ve/pve-apt-hook" "/usr/share/proxmox-ve/pve-apt-hook_old"
$> touch  /usr/share/proxmox-ve/pve-apt-hook
$> chmod u+x /usr/share/proxmox-ve/pve-apt-hook

apt update
apt dist-upgrade

Do not do this, this will remove all proxmox-related packages from the host - there's a reason why this hook is included...
 
  • Like
Reactions: fiona and DigitalLF
Are you sure that you have the proper repositories configured for PVE 9?

Did you do the steps as described in https://pve.proxmox.com/wiki/Upgrade_from_8_to_9#Add_the_Proxmox_VE_9_Package_Repository ?
Very weird!

Running the:
Code:
cat > /etc/apt/sources.list.d/proxmox.sources << EOF
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF

cat > /etc/apt/sources.list.d/ceph.sources << EOF
Types: deb
URIs: http://download.proxmox.com/debian/ceph-squid
Suites: trixie
Components: no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF

Part again worked! Thank you! :)