Getting error when I try and upgrade "smartmontools" dpkg returned an error code

ropelletier

New Member
Jan 5, 2023
4
0
1
Tried running apt update && apt dist-upgrade

Code:
Errors were encountered while processing:
 /tmp/apt-dpkg-install-MaowlS/166-smartmontools_7.3-pve1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code:
dpkg --remove smartmontools
dpkg: dependency problems prevent removal of smartmontools:
 libpve-storage-perl depends on smartmontools.
dpkg: error processing package smartmontools (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 smartmontools



Proxmox seems to have updated, at least partially.
Code:
root@cms-pve2:~# pveversion
pve-manager/8.1.10/4b06efb5db453f29 (running kernel: 5.15.143-1-pve)

Not sure where to go from here. Everythng seems to be running ok, but obviously don't want to ignore this.
 
Just a blind guess: is your root filesystem full?

For reference, with no-subscribtion I have:
Code:
~# pveversion ; apt policy smartmontools
pve-manager/8.1.10/4b06efb5db453f29 (running kernel: 6.5.13-3-pve)
smartmontools:
  Installed: 7.3-pve1
  Candidate: 7.3-pve1
  Version table:
 *** 7.3-pve1 500
        500 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages

And: do not use low-level "dpkg" to remove packages, use "apt remove smartmontools" instead. Or try "apt --reinstall install smartmontools" to get a clean state again...
 
Last edited:
Realized what the issue was and this can be ignored. I had forgot that I had a custom file and had set the immutability flag. Fixed now with

chattr -i /usr/sbin/smartctl