[SOLVED] unable to apt upgrade

avidesh

New Member
Dec 28, 2023
29
2
3
Hi, I have an LXC running Ubuntu.
Code:
root@aadmedia:~# uname -a
Linux aadmedia 6.8.12-9-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-9 (2025-03-16T19:18Z) x86_64 x86_64 x86_64 GNU/Linux

currently I am unable to upgrade any package. I have tried multiple things suggested on various forums. I run into following error.

Code:
apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libperl5.38t64
The following packages will be upgraded:
  libperl5.38t64
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 0 B/4871 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 24865 files and directories currently installed.)
Preparing to unpack .../libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb ...
Unpacking libperl5.38t64:amd64 (5.38.2-3.2ubuntu0.1) over (5.38.2-3.2build2.1) ...
dpkg: error processing archive /var/cache/apt/archives/libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb (--unpack):
 unable to stat './usr/lib/x86_64-linux-gnu/perl/5.38.2/auto/Storable/Storable.so' (which was about to be installed): Bad message
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I started checking with Ubuntu forums. I was informed that they can't help as I am using 6.8.12-9-pve.
Any help on this forum?
 
maybe try removing that package file (/var/cache/apt/archives/libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb), and re-running apt update and apt full-ugprade ?
 
maybe try removing that package file (/var/cache/apt/archives/libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb), and re-running apt update and apt full-ugprade ?
after removing that package file and then re-running the update and full-upgrade commands I got the following:
Code:
root@aadmedia:~# apt update && apt full-ugprade 
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]                                                     
Get:3 https://pkgs.tailscale.com/stable/ubuntu noble InRelease                                                               
Get:4 http://archive.ubuntu.com/ubuntu noble-security InRelease [126 kB]                                 
Get:5 https://repo.jellyfin.org/ubuntu noble InRelease [10.6 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1027 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main Translation-en [224 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble-updates/restricted Translation-en [199 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1057 kB]
Get:10 http://archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [267 kB]
Get:11 http://archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [782 kB]
Get:12 http://archive.ubuntu.com/ubuntu noble-security/main Translation-en [147 kB]
Get:13 http://archive.ubuntu.com/ubuntu noble-security/restricted Translation-en [191 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [834 kB]
Fetched 4998 kB in 3s (1995 kB/s)                               
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
12 packages can be upgraded. Run 'apt list --upgradable' to see them.
E: Invalid operation full-ugprade
root@aadmedia:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 perl : Depends: libperl5.38t64 (= 5.38.2-3.2ubuntu0.1) but 5.38.2-3.2build2.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@aadmedia:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libperl5.38t64
The following packages will be upgraded:
  libperl5.38t64
1 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
1 not fully installed or removed.
Need to get 4871 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libperl5.38t64 amd64 5.38.2-3.2ubuntu0.1 [4871 kB]
Fetched 4871 kB in 2s (3006 kB/s)         
(Reading database ... 24865 files and directories currently installed.)
Preparing to unpack .../libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb ...
Unpacking libperl5.38t64:amd64 (5.38.2-3.2ubuntu0.1) over (5.38.2-3.2build2.1) ...
dpkg: error processing archive /var/cache/apt/archives/libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb (--unpack):
 unable to stat './usr/lib/x86_64-linux-gnu/perl/5.38.2/auto/Storable/Storable.so' (which was about to be installed): Bad message
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libperl5.38t64_5.38.2-3.2ubuntu0.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
okay.. what about the current path on disk? can you try running

Code:
stat /usr/lib/x86_64-linux-gnu/perl/5.38.2/auto/Storable/Storable.so
 
okay.. what about the current path on disk? can you try running

Code:
stat /usr/lib/x86_64-linux-gnu/perl/5.38.2/auto/Storable/Storable.so
Code:
root@aadmedia:~# stat /usr/lib/x86_64-linux-gnu/perl/5.38.2/auto/Storable/Storable.so
stat: cannot statx '/usr/lib/x86_64-linux-gnu/perl/5.38.2/auto/Storable/Storable.so': Bad message
 
what storage is the container on?
 
could you post "lvs -a"?

it sounds a bit like the filesystem of that container's rootfs might be corrupt..
 
:( hen and an egg?
Code:
root@aadmedia:~# lvs -a
Command 'lvs' not found, but can be installed with:
apt install lvm2
root@aadmedia:~# apt install lvm2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 lvm2 : Depends: libaio1t64 (>= 0.3.93) but it is not going to be installed
        Depends: libdevmapper-event1.02.1 (>= 2:1.02.74) but it is not going to be installed
        Depends: dmeventd (>= 2:1.02.185-3ubuntu3.2~) but it is not going to be installed
        Recommends: thin-provisioning-tools but it is not going to be installed
 perl : Depends: libperl5.38t64 (= 5.38.2-3.2ubuntu0.1) but 5.38.2-3.2build2.1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
 
sorry, "lvs -a" on the host, not in the container :)
 
  • Like
Reactions: avidesh
my bad. here it is.
Code:
root@pve:~# lvs -a
  LV              VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data            pve twi-aotz-- <53.93g             51.13  2.50                          
  [data_tdata]    pve Twi-ao---- <53.93g                                                  
  [data_tmeta]    pve ewi-ao----   1.00g                                                  
  [lvol0_pmspare] pve ewi-------   1.00g                                                  
  root            pve -wi-ao---- <39.56g                                                  
  swap            pve -wi-ao----   8.00g                                                  
  vm-100-disk-0   pve Vwi-aotz--   4.00m data        0.00                                  
  vm-100-disk-1   pve Vwi-aotz--  32.00g data        53.05                                
  vm-101-disk-0   pve Vwi-aotz--   8.00g data        56.67                                
  vm-103-disk-0   pve Vwi-aotz--  10.00g data        60.61

LXC in question is 101
 
okay, that looks fine.. you could try shutting the container down and running "pct fsck XXX" where XXX is the VMID of the container..
 
  • Like
Reactions: avidesh
Code:
root@pve:~# pct fsck 101
fsck from util-linux 2.38.1
/dev/mapper/pve-vm--101--disk--0 contains a file system with errors, check forced.
/dev/mapper/pve-vm--101--disk--0: Deleted inode 395064 has zero dtime.  FIXED.
/dev/mapper/pve-vm--101--disk--0: Deleted inode 395265 has zero dtime.  FIXED.
/dev/mapper/pve-vm--101--disk--0: Inode 410436 passes checks, but checksum does not match inode.  FIXED.
/dev/mapper/pve-vm--101--disk--0: 38371/524288 files (0.6% non-contiguous), 772927/2097152 blocks
command 'fsck -a -l /dev/pve/vm-101-disk-0' failed: exit code 1
 
could you run it once more?
 
Code:
root@pve:~# pct fsck 101
fsck from util-linux 2.38.1
/dev/mapper/pve-vm--101--disk--0: clean, 38371/524288 files, 772927/2097152 blocks
 
great that it worked :)