MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.91k stars 501 forks source link

dietpi-update error while upgrading to latest DietPi version #7101

Closed Pipodi closed 5 months ago

Pipodi commented 5 months ago

Details:

MichaIng commented 5 months ago

files list file for package 'php-common' is missing final newline

/var/lib/dpkg/info/php-common.list is damaged. Can you check and post its content?

cat /var/lib/dpkg/info/php-common.list
Pipodi commented 5 months ago

/var/lib/dpkg/info/php-common.list is damaged. Can you check and post its content?

Yeah, I think so.

dietpi@DietPi:~$ cat /var/lib/dpkg/info/php-common.list
/./e`c
/et#/croN.d
▒etc/cro?.$/▒)p▒od)b
/▒)b/Syqtamoly"/▒Y▒~emd+syStA,
/lybosysTmmd/systemophps%srionslea~.sdrfice
/lYb?wywte▒`.{qste▒/rlpsess▒onclean.|koeouqr
/ug▒^ij
▒usr&lkb-▒hp
/uqr/l▒b7php▒plp-"po-soaket-he▒Q▒r
/usr
    lib/pipp|▒)helrmr
▒el15bib/pht/php-mAM▒|{gv)pt
,usrli▒/ujp/Sessioncdea>/5sv/#bin▒/usr/qbin-pip▒nmoD▒/twr/sbyn/p▒pquury/u▒r/rHMrG
/usr+▒haRu/doc
/usr+Slare/dog/0hp-}eO.
sommgn/c angelog.
/qSr?#hjsaodmc/`▒0-cnimoN)c
                           p▒right
/usb/sha{e'lhnuian?usr/2jr▒/l)ntIaN/Wvr▒▒de/USr/shaqeliNtial?overriTer/pht-commwn
                                                                                 -t`r
/var/lib
/6ar-▒ib/php
/var/l)b/phpmGlulew
Var/lIg▒hp/rass▒on/us2/sbin&phpnism/$

I immagine it was corrupted somehow.

MichaIng commented 5 months ago

I immagine it was corrupted somehow.

Completely 😄. Let's repair it:

cd /tmp
apt download php-common
dpkg-deb -R php-common*.deb php-common
find php-common -mindepth 1 ! \( -path 'php-common/DEBIAN*' -prune \) | sed 's/^php-common//' > /var/lib/dpkg/info/php-common.list
rm -R php-common*

And please check kernel logs as well, in case other files get/got corrupted, due to I/O errors or so:

dmesg -l 0,1,2,3
Pipodi commented 5 months ago

Thank you so much. File restored and the update was successful. Closing the issue.