Proxmox 4 community updates fail postinst

sam1994

New Member
Aug 17, 2014
17
1
1
Hi,

I am using the PVE community repository. After running a dist-upgrade, I seem to encounter a problem which stops the packages from updating completely.

Code:
Setting up pve-manager (4.4-17) ...
Job for pvedaemon.service failed. See 'systemctl status pvedaemon.service' and 'journalctl -xn' for details.
dpkg: error processing package pve-manager (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of proxmox-ve:
 proxmox-ve depends on pve-manager; however:
  Package pve-manager is not configured yet.

dpkg: error processing package proxmox-ve (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 pve-manager
 proxmox-ve
E: Sub-process /usr/bin/dpkg returned an error code (1)

I checked /var/lib/dpkg/info/pve-manager.postinst and it looks like this calls
/usr/bin/pveupdate. This fails on my system with the following errors:

Code:
Encode/Alias.pm did not return a true value at /usr/lib/x86_64-linux-gnu/perl/5.20/Encode.pm line 47.
BEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl/5.20/Encode.pm line 47.
Compilation failed in require at /usr/share/perl5/PVE/SafeSyslog.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/SafeSyslog.pm line 7.
Compilation failed in require at /usr/share/perl5/PVE/INotify.pm line 14.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/INotify.pm line 14.
Compilation failed in require at /usr/bin/pveupdate line 10.
BEGIN failed--compilation aborted at /usr/bin/pveupdate line 10.

I'd appreciate any pointers to further troubleshoot this issue.

Thanks
 
Looks strange to me - maybe you modified /usr/lib/x86_64-linux-gnu/perl/5.24.1/Encode/Alias.pm ?

What is the output of

# md5sum /usr/lib/x86_64-linux-gnu/perl/5.24.1/Encode/Alias.pm

Please can you post the contents (first 100 lines) of that file?
 
Hi,

Thanks for your response.

I fixed it now. I tested on another Proxmox server and had the same issue, but not on a 3rd.

It seems that if you dist-upgrade pve-manager to 4.4-15 without a reboot, then
upgrade to 4.4.17, you'll have a problem.

I had to manually grab http://download.proxmox.com/debian/...on/binary-amd64/pve-manager_4.4-15_amd64.deb; dpkg -x it over /; then tweak /var/lib/dpkg/status to reflect the old version.

After this, I was able to reboot and dist-upgrade over fine.

On both jessie boxes: Perl is 5.20.2; and md5sum is 4ed8d1759c2f3f04f28aef1cf026a11c.
First thing I did was pull perl-common and perl-modules packages and reinstall on the affected server; but didn't help.

I suspect some issues occurred in pveupdate that meant variables weren't being populated and passed
properly, so postinst bailed. If a reboot is needed between updates, I'd recommend setting /var/run/reboot-required in
postinst, and bailing in preinst if this file exists.

If I can reproduce it on other boxes, I will let you know.

Sam
 
Hi Sam,

In case this happens again, can you try these commands if it works for you? I put descriptions in parenthesis in case anyone new to linux/proxmox are reading this:

#apt clean (cleans apt cache)
#apt update (downloads latest package lists from repositories)
#apt-get install -f (fixes broken packages)
#dpkg --configure -a (fixes interrupted dpkg installations)

Hopefully if all goes well, reboot and I usually follow up with:

#apt clean
#apt autoremove (removes packages installed by other packages and no longer needed)

BTW one thing I noticed with today's latest updates in no-subscription repository, after apt dist-upgrade, it now states:

"Seems you installed a kernel update - Please consider rebooting this node to activate the new kernel."
 
Hi @GadgetPig

Thanks for the pointers. I actually maintain a Debian derivative, and we often get some interesting issues with users upgrading, so I am familiar with troubleshooting dpkg, mirroring issues and partial archives.

I tried your suggestions above before troubleshooting the postinst.

We'll see if it happens again.
 
  • Like
Reactions: GadgetPig

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!