You are not logged in.
Updating my server, I got this error message:
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
eudev libeudev1
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1170 kB of archives.
After this operation, 3072 B disk space will be freed.
Get:1 http://pkgmaster.devuan.org/merged beowulf/main amd64 eudev amd64 3.2.9-10~beowulf1 [1072 kB]
Get:2 http://pkgmaster.devuan.org/merged beowulf/main amd64 libeudev1 amd64 3.2.9-10~beowulf1 [97.8 kB]
apt-listchanges: Reading changelogs...
Fetched 1170 kB in 1s (1557 kB/s)
(Reading database ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'console-setup' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
Yes, I'm using pkgmaster as other entries in sources.list failed me too many times. Things may have improved since, so I might give it a try again.
Last edited by Dutch_Master (2021-11-27 22:54:20)
Offline
this doesn't look related to eudev upgrade. probably apt or some package error..:
files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
files list file for package 'console-setup' is missing final newline
i would suggest apt update & apt -f install. then check status of those packages. from a personal fully upgraded beowulf vps :
apt policy libexpat1
libexpat1:
Installed: 2.2.6-2+deb10u1
Candidate: 2.2.6-2+deb10u1
Version table:
*** 2.2.6-2+deb10u1 500
500 http://deb.devuan.org/merged beowulf/main amd64 Packages
500 http://deb.devuan.org/merged beowulf-security/main amd64 Packages
100 /var/lib/dpkg/status
apt policy console-setup
console-setup:
Installed: 1.193~deb10u1
Candidate: 1.193~deb10u1
Version table:
*** 1.193~deb10u1 500
500 http://deb.devuan.org/merged beowulf/main amd64 Packages
Offline
I still get the same error. Key is this line:
files list file for package 'console-setup' is missing final newline
Thx for replying!
Offline
Typo?
Online
Hmmm, oddly enough, upgrading the exact same packages on my desktop went flawlessly. Difference: I used apt on the server and aptitude on the desktop.
Offline
It's a dirty hack but you could (re)move /var/lib/dpkg/info/libexpat1:amd64.list out of the way and run the upgrade again.
I would suspect file corruption in this case but that's just a guess.
Brianna Ghey — Rest In Power
Offline
Thx, I'll give it a try later.
Offline
Update: it failed, I still get the error:
dpkg: unrecoverable fatal error, aborting:
files list file for package 'console-setup' is missing final newline
Reinstalling console-setup didn't help either. Purging libexpat1 will remove 122 packages depending on it, via the dependency chain on dbus, so that's not really an option.
That said, it's now affecting the upgrading of other packages as apt, as well as aptitude, will clonk out with the above error and not upgrade other packages at all.
For completeness:
apt policy libexpat1 console-setup
libexpat1:
Installed: 2.2.6-2+deb10u1
Candidate: 2.2.6-2+deb10u1
Version table:
*** 2.2.6-2+deb10u1 500
500 http://pkgmaster.devuan.org/merged beowulf/main amd64 Packages
500 http://pkgmaster.devuan.org/merged beowulf-security/main amd64 Packages
100 /var/lib/dpkg/status
console-setup:
Installed: 1.193~deb10u1
Candidate: 1.193~deb10u1
Version table:
*** 1.193~deb10u1 500
500 http://pkgmaster.devuan.org/merged beowulf/main amd64 Packages
100 /var/lib/dpkg/status
Offline
Check the filesystem and the health of the drive. It must be corruption.
Super hack:
for file in /var/lib/dpkg/info/?*.list ; do sudo tee -a "$file" <<<$(printf '\n') ; done
^ That adds a newline to every .list file. I would say backup before trying it but your system doesn't appear to be functional so that's probably pointless.
Do you have a backup from before these problems started?
Brianna Ghey — Rest In Power
Offline
Well, that didn't work as advertised:
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libnet-ssleay-perl' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)
Furthermore, the file /var/lib/dpkg/info/libexpat1:amd64.list doesn't actually exist:
# ls -l /var/lib/dpkg/info/ | grep libexpat
-rw-r--r-- 1 root root 434 Sep 19 2019 libexpat1:amd64.md5sums.bak
-rw-r--r-- 1 root root 110 Sep 19 2019 libexpat1:amd64.shlibs.bak
-rw-r--r-- 1 root root 5823 Sep 19 2019 libexpat1:amd64.symbols.bak
-rw-r--r-- 1 root root 67 Sep 19 2019 libexpat1:amd64.triggers.bak
(the .bak extensions are mine, I moved them as suggested, so it's fairly easy to restore)
The machine is my file/backup server, not my daily-driver desktop. That one is quite alright and updated just fine as I'd mentioned before.
The system drive for the server is /dev/sdc, the other 4 are HDD's for the RAID6. here's smartctl:
smartctl -a /dev/sdc
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-18-amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: JMicron based SSDs
Device Model: KINGSTON SV100S2128G
Serial Number: 08BA90006616
Firmware Version: D100811a
User Capacity: 128,035,676,160 bytes [128 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS (minor revision not indicated)
SATA Version is: SATA 2.6, 3.0 Gb/s
Local Time is: Sat Nov 27 16:54:30 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
<SNIPPED>
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Unknown_JMF_Attribute 0x0007 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0013 100 100 050 Pre-fail Always - 0
7 Unknown_JMF_Attribute 0x000b 100 100 050 Pre-fail Always - 0
8 Unknown_JMF_Attribute 0x0005 100 100 050 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 36710
10 Unknown_JMF_Attribute 0x0013 100 100 050 Pre-fail Always - 0
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 2380
168 SATA_Phy_Error_Count 0x0012 100 100 000 Old_age Always - 3
175 Bad_Cluster_Table_Count 0x0003 100 100 010 Pre-fail Always - 30
192 Unexpect_Power_Loss_Ct 0x0012 100 100 000 Old_age Always - 0
194 Temperature_Celsius 0x0022 025 100 020 Old_age Always - 25 (Min/Max 25/40)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
240 Unknown_JMF_Attribute 0x0013 100 100 050 Pre-fail Always - 0
170 Bad_Block_Count 0x0003 100 100 010 Pre-fail Always - 0 309 0
173 Erase_Count 0x0012 100 100 000 Old_age Always - 5 13136 9594
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 19688 -
# 2 Short offline Completed without error 00% 19622 -
Selective Self-tests/Logging not supported
A bit long, sorry. The file system (JFS) is fine, it's checked on every boot, last reboot was just 7 days ago. The drive is relatively old, re-used and replaced an even older drive (which had 60+k hours on it) and I may replace it with a newer one, although I'm hoping to upgrade the hardware and get an NVMe drive for it instead. (this older system can't boot from NVMe, so that's why it uses a SATA drive)
Offline
We could try
dpkg -V
But I think we already know what that will say.
Not sure what else to do here. Sorry.
Brianna Ghey — Rest In Power
Offline
OK, thx for helping anyway. I may put in a new(er) SSD for the OS while I'm at it, perhaps recover some settings from the old disk.
Offline
To undo the resulting badness of double newlines in those files you may use:
sudo sed '/^$/d' -i /var/lib/dpkg/info/*.list
That will still leave the previously missing final newline in /var/lib/dpkg/info/console-setup.list
In addition, given the original issue, I would also
sudo apt-get install --reinstall console-setup
unless I knew that I had been hand-editing those files sometime earlier (and could thus imagine that I had removed a final newline from at least one of them). in fact, that re-installation would have been my first point of call well before venturing into willy-nilly hand editing in the dpkg database.
Offline
Thx all, but I managed to solve it, at least by the looks of it.
I knew from my Funtoo days portage had the option for emerge to completely re-install all installed software with a clean tree and I found a command effectively doing the same for aptitude:
aptitude reinstall '~i'
That still gave me an error, so I moved the entire directory /var/lib/dpkg/info to a temporary location and recreated the /var/lib/dpkg/info directory itself. I reran the reinstall command for aptitude and all packages were nicely re-downloaded after cleaning out the package cache. So, everything is now reinstalled and after a reboot for a new kernel, all is well again
Offline