Solution to the Upgrade Failure Caused by ”pve-apt-hook” Error When Upgrading PVE 7.4 to 8.1
This article was last updated 287 days ago. The information within may have evolved or changed; if anything is outdated or broken, please feel free to leave a message in the comments section.
Article Abstract
During the process of upgrading Proxmox VE 7.4 to 8.1 on an idle server, the upgrade failed due to an error in the pve-apt-hook script. The issue was traced back to the residual effects of previously installed Ceph-related dependencies. By editing the pve-apt-hook configuration file to comment out lines, installing missing dependencies such as librados2 step-by-step, and repairing the dependency chain, the upgrade was finally completed. Practice has proven that cross-version upgrades require careful handling of dependencies. It is recommended to back up virtual machines before upgrading production environments, and direct major version upgrades are not recommended for non-essential scenarios; a clean installation can be preferred to avoid risks.
Qwen3-14B · 2026-06-18

Today, on a whim, I wanted to upgrade PVE 7.4-17 on my idle server to the latest PVE 8.1, mainly to pave the way for my Intel CPU mini PC first. After all, production equipment cannot be upgraded casually; it would be a disaster if it failed.

I will skip the previous steps, as they are not the main focus, and there are already many tutorials online. You can refer to this blogger's article:Proxmox VE (PVE) 7.X to 8.0 Upgrade Tutorial。

The key issue occurred when running the critical step, executing the following command to upgrade to PVE 8.0:

apt dist-upgrade -y

As a result, the error shown in the figure below occurred, causing the upgrade to 8.0 to fail:

image.png

This might be related to some Ceph dependencies I modified when I was planning to study Ceph earlier. Anyway, once a problem arises, it must be solved. After searching the internet for a long time, I finally resolved it. Here, I will record the troubleshooting steps.

Edit the pveapthook configuration file

vim /etc/apt/apt.conf.d/10pveapthook

image.png

As shown below, then save and exit:
image.png

Run the following commands in sequence

dpkg --configure -a
apt-get --fix-broken install
apt full-upgrade

image.png

apt-get --fix-broken install

apt-get install librbd1=16.2.11+ds-2

Check the dependencies of librbd1

image.png

apt-get install librbd1=16.2.11+ds-2

apt-get install librados2=16.2.11+ds-2

image.png

First install the required dependency librados2:

apt-get install librbd1=16.2.11+ds-2  
apt-get install python3-ceph-argparse=16.2.11+ds-2  
apt-get install python3-ceph-common=16.2.11+ds-2  
apt-get install python3-cephfs=16.2.11+ds-2
apt-get install python3-rbd=16.2.11+ds-2

Then install the following dependencies in sequence:

image.png

apt-get install librbd1=16.2.11+ds-2

apt-get install libcephfs2=16.2.11+ds-2
apt-get install python3-rados=16.2.11+ds-2

apt-get install python3-ceph-common=16.2.11+ds-2

apt-get install python3-cephfs=16.2.11+ds-2

apt-get install --reinstall proxmox-ve

If an error occurs during a certain step of the installation, install the missing dependencies first, just like in the previous section. For example, I encountered an error when installing the 4th item:

So I ran the following command first to install the missing dependencies:apt dist-upgrade -yapt-get install libcephfs2=16.2.11+ds-2

image.png

apt-get install python3-rados=16.2.11+ds-2
image.png

apt-get install python3-rados=16.2.11+ds-2
image.png

Success:
image.png

Then rerun the command that failed, and it will succeed.

Reinstall proxmox-ve

View Related Categories · 3 Matches
📌 Content Structure Prompt:
This content is part of the following knowledge map, where you can view the complete content path: Blog Knowledge Map。
📎 Related Articles
Share this article
The blog content is original, please indicate the source when reposting! The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if needed, you can join theTelegram Groupto discuss questions together.
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗ
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Kaomoji
Emoji
Little Dinosaur
Flower!
Previous
Next
       

👋 Welcome to “Wudi's Personal Blog”

Here, long-term exploration is mainly carried out around the following directions:

🧱 Personal Digital Infrastructure and Blog System Construction
☁️ Cloudflare and Network Architecture Practice
🧠 AI and Knowledge System Exploration
🛡️ Network Security and Access Optimization
🎵 Music and Sound Cognition
👁️ Cognitive Perspectives and Worldviews