Error with update: /bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found

I know this is an older post but I figured I would post a temporary, possibly dangerous solution since it might circumvent dependencies. I got this error when I downgraded proxmox-ve then tried to re-upgrade it at a later date. This likely applies to anyone having issues related to:
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
Which I believe is related to this patch https://pve.proxmox.com/pipermail/pve-devel/2018-April/031338.html regarding the addition of a hook script to prevent users from messing with conflicting dependencies (which I suppose I am doing, so do this at your own risk o_O).
I simply created the file pve-apt-hook by executing the command
Code:
# mkdir /usr/share/proxmox-ve
# nano /usr/share/proxmox-ve/pve-apt-hook
I wrote empty lines to the script, then saved it with ctrl+o ctrl+x. I then made it executable with
Code:
chmod u+x /usr/share/proxmox-ve/pve-apt-hook
Then re-installed proxmox-ve with
Code:
apt install proxmox-ve
and it worked. I then removed the hook file when I was done. Hope this helps somebody.
It works!
 
@Elfy
Kudos from 2022.
I had the same issue for upgrading the system. Could not do anything due to the same error message.

It helped :)
 
Thk, Elfy! While struggling to install pve 7 in 2022 (due to x.org error), i tried to install pve 6 and upgrade it to pve 7. this helped a lot!
 
@Elfy You are the best!! Thanks so much! You saved me tons of re-setup labor. FYI i made a account here just to write this comment :cool:
 
  • Like
Reactions: Elfy
I know this is an older post but I figured I would post a temporary, possibly dangerous solution since it might circumvent dependencies. I got this error when I downgraded proxmox-ve then tried to re-upgrade it at a later date. This likely applies to anyone having issues related to:
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
Which I believe is related to this patch https://pve.proxmox.com/pipermail/pve-devel/2018-April/031338.html regarding the addition of a hook script to prevent users from messing with conflicting dependencies (which I suppose I am doing, so do this at your own risk o_O).
I simply created the file pve-apt-hook by executing the command
Code:
# mkdir /usr/share/proxmox-ve
# nano /usr/share/proxmox-ve/pve-apt-hook
I wrote empty lines to the script, then saved it with ctrl+o ctrl+x. I then made it executable with
Code:
chmod u+x /usr/share/proxmox-ve/pve-apt-hook
Then re-installed proxmox-ve with
Code:
apt install proxmox-ve
and it worked. I then removed the hook file when I was done. Hope this helps somebody.
Thank you, you save my day!
It's work for me, after broken upgrade from 6.4-15 to 7.3-3
 
I know this is an older post but I figured I would post a temporary, possibly dangerous solution since it might circumvent dependencies. I got this error when I downgraded proxmox-ve then tried to re-upgrade it at a later date. This likely applies to anyone having issues related to:
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
Which I believe is related to this patch https://pve.proxmox.com/pipermail/pve-devel/2018-April/031338.html regarding the addition of a hook script to prevent users from messing with conflicting dependencies (which I suppose I am doing, so do this at your own risk o_O).
I simply created the file pve-apt-hook by executing the command
Code:
# mkdir /usr/share/proxmox-ve
# nano /usr/share/proxmox-ve/pve-apt-hook
I wrote empty lines to the script, then saved it with ctrl+o ctrl+x. I then made it executable with
Code:
chmod u+x /usr/share/proxmox-ve/pve-apt-hook
Then re-installed proxmox-ve with
Code:
apt install proxmox-ve
and it worked. I then removed the hook file when I was done. Hope this helps somebody.
I also had the issue while upgrading from 7 to 8, thanks @Elfy !!
 
I know this is an older post but I figured I would post a temporary, possibly dangerous solution since it might circumvent dependencies. I got this error when I downgraded proxmox-ve then tried to re-upgrade it at a later date. This likely applies to anyone having issues related to:
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
Which I believe is related to this patch https://pve.proxmox.com/pipermail/pve-devel/2018-April/031338.html regarding the addition of a hook script to prevent users from messing with conflicting dependencies (which I suppose I am doing, so do this at your own risk o_O).
I simply created the file pve-apt-hook by executing the command
Code:
# mkdir /usr/share/proxmox-ve
# nano /usr/share/proxmox-ve/pve-apt-hook
I wrote empty lines to the script, then saved it with ctrl+o ctrl+x. I then made it executable with
Code:
chmod u+x /usr/share/proxmox-ve/pve-apt-hook
Then re-installed proxmox-ve with
Code:
apt install proxmox-ve
and it worked. I then removed the hook file when I was done. Hope this helps somebody.
I too ran into an issue with the upgrade from 7 to 8. Thank you so much @Elfy !
 
I know this is an older post but I figured I would post a temporary, possibly dangerous solution since it might circumvent dependencies. I got this error when I downgraded proxmox-ve then tried to re-upgrade it at a later date. This likely applies to anyone having issues related to:
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
Which I believe is related to this patch https://pve.proxmox.com/pipermail/pve-devel/2018-April/031338.html regarding the addition of a hook script to prevent users from messing with conflicting dependencies (which I suppose I am doing, so do this at your own risk o_O).
I simply created the file pve-apt-hook by executing the command
Code:
# mkdir /usr/share/proxmox-ve
# nano /usr/share/proxmox-ve/pve-apt-hook
I wrote empty lines to the script, then saved it with ctrl+o ctrl+x. I then made it executable with
Code:
chmod u+x /usr/share/proxmox-ve/pve-apt-hook
Then re-installed proxmox-ve with
Code:
apt install proxmox-ve
and it worked. I then removed the hook file when I was done. Hope this helps somebody.
same problem and your solution helped me a lot! thanks
 
I know this is an older post but I figured I would post a temporary, possibly dangerous solution since it might circumvent dependencies. I got this error when I downgraded proxmox-ve then tried to re-upgrade it at a later date. This likely applies to anyone having issues related to:
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
Which I believe is related to this patch https://pve.proxmox.com/pipermail/pve-devel/2018-April/031338.html regarding the addition of a hook script to prevent users from messing with conflicting dependencies (which I suppose I am doing, so do this at your own risk o_O).
I simply created the file pve-apt-hook by executing the command
Code:
# mkdir /usr/share/proxmox-ve
# nano /usr/share/proxmox-ve/pve-apt-hook
I wrote empty lines to the script, then saved it with ctrl+o ctrl+x. I then made it executable with
Code:
chmod u+x /usr/share/proxmox-ve/pve-apt-hook
Then re-installed proxmox-ve with
Code:
apt install proxmox-ve
and it worked. I then removed the hook file when I was done. Hope this helps somebody.

My solution is similar; I comment out all lines in the file 'pve-apt-hook'. :)

https://forum.proxmox.com/threads/p...-ceph-common-and-ceph-fuse.135418/post-599396
 
Last edited:
  • Like
Reactions: Elfy
I know this is an older post but I figured I would post a temporary, possibly dangerous solution since it might circumvent dependencies. I got this error when I downgraded proxmox-ve then tried to re-upgrade it at a later date. This likely applies to anyone having issues related to:
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
Which I believe is related to this patch https://pve.proxmox.com/pipermail/pve-devel/2018-April/031338.html regarding the addition of a hook script to prevent users from messing with conflicting dependencies (which I suppose I am doing, so do this at your own risk o_O).
I simply created the file pve-apt-hook by executing the command
Code:
# mkdir /usr/share/proxmox-ve
# nano /usr/share/proxmox-ve/pve-apt-hook
I wrote empty lines to the script, then saved it with ctrl+o ctrl+x. I then made it executable with
Code:
chmod u+x /usr/share/proxmox-ve/pve-apt-hook
Then re-installed proxmox-ve with
Code:
apt install proxmox-ve
and it worked. I then removed the hook file when I was done. Hope this helps somebody.
I created an account just to say that your solution(even 5 years later) was of tremendous help! Thank you so much!
 
  • Like
Reactions: fritzschmale
Just ran into this problem because I had to downgrade my kernel after a kernel dump error on boot. Kernel 6.5.13-4 was my troublemaker and I'm back at 6.5.13-3 now. After the downgrade, the server was having this error but making /usr/share/proxmox-ve/pve-apt-hook solved the issue nice and easy! Thanks a lot!
 
Last edited:
  • Like
Reactions: Elfy