Creating a bug report/issue
I have searched the existing open and closed issues
Required Information
- DietPi version | G_DIETPI_VERSION_CORE=10
G_DIETPI_VERSION_SUB=5
G_DIETPI_VERSION_RC=2
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’
- Distro version | trixie
- Kernel version | Linux DietPi 6.18.34-current-sunxi64 #1 SMP PREEMPT Mon Jun 1 15:51:08 UTC 2026 aarch64 GNU/Linux
- Architecture | arm64
- SBC model | NanoPi NEO Plus2 (aarch64)
- Power supply used 5V
- SD card used | SanDisk ultra
Additional Information (if applicable)
-
Software title | dietpi
-
Was the software title installed freshly
Can this issue be replicated on a fresh installation of DietPi? yes
-
Bug report ID | d0a798f3-f74c-481b-92a0-f395590d7353
Steps to reproduce
dietpi-update does succeed
apt upgrade will fail after apt update
Expected behaviour
Actual behaviour
Extra details
root@DietPi:~# apt upgrade
Upgrading:
armbian-firmware
Summary:
Upgrading: 1, Installing: 0, Removing: 0, Not Upgrading: 0
1 not fully installed or removed.
Download size: 31.1 MB
Space needed: 1548 kB / 13.4 GB available
Continue? [Y/n]
Get:1 https://dietpi.com/apt all/nanopineoplus2 all armbian-firmware all 26.08.0-trunk-dietpi1 [31.1 MB]
Fetched 31.1 MB in 4s (7102 kB/s)
(Reading database ... 16202 files and directories currently installed.)
Preparing to unpack .../armbian-firmware_26.08.0-trunk-dietpi1_all.deb ...
Unpacking armbian-firmware (26.08.0-trunk-dietpi1) over (26.05.0-trunk-dietpi4) ...
dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi1_all.deb' (size=31062520) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi1_all.deb (--unpack):
cannot copy extracted data for './lib/firmware/brcm/fw_bcm43456c5_ag.bin' to '/lib/firmware/brcm/fw_bcm43456c5_ag.bin.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi1_all.deb
Error: Sub-process /usr/bin/dpkg returned an error code (1)
looks the file download was not complete. Hopefully a temp issue.
Can you try following
apt update
apt upgrade
see attached file with log from initial install.
different SD card.
same issue.
maybe this helps locating the issue.
thanks
F
(attachments)
update-upgrade.txt (3.46 KB)
firstlog.txt (8.71 KB)
removing the file
/var/cache/apt/archives/linux-image-current-sunxi64_26.08.0-trunk-dietpi1_arm64.deb
did not solve the issue, it got downloaded again causing the same error.
however running
dpkg -i
/var/cache/apt/archives/linux-image-current-sunxi64_26.08.0-trunk-dietpi1_arm64.deb
did install the package and allowed for further completion of the setup.
Does/did the manual install of the armbian-firmware package work as well?
dpkg -i /var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi1_all.deb
Quite weird, since apt internally does exactly the same. Can you check for kernel errors?
dmesg -l 0,1,2,3
Does/did the manual install of the |armbian-firmware| package work as well?
dpkg -i /var/cache/apt/archives/armbian-firmware_26.08.0-trunk-
dietpi1_all.deb |
i only tried the file that got a complain after the initial root login
and setup.
I quit the setup and did a manual dpkg -i
then closed the session and ssh in again as root.
then the initial setup continued and everything went smooth from then on.
I did have to re-install dietpi as the upgrade from the previous version
got stuck and the machine would not startup again.
I now made a clone from the SD so at least I can start from this point
on instead of going through the complete ritual of editing the
dietpi.txt file.
Quite weird, since |apt| internally does exactly the same. Can you check
for kernel errors?
dmesg -l 0,1,2,3 |
dietpi@DietPi:~$ dmesg -l 0,1,2,3
[ 0.924110] mdio_bus mdio_mux-0.1: MDIO device at address 1 is missing.
[ 0.980749] WCN_ERR: dts node for bt_wake not found
Thanks for the fast response !
.Floris
The armbian-firmware package failed to extract as well based on your logs. But maybe a retry solved that one. If the setup went through, then all packages should be up-to-date.
I thought some I/O or filesystem error, undervoltage, or some OOM kill. The kernel log does not show any such error, but maybe you rebooted in the meantime.
If you face such again, check dmesg -l 0,1,2,3 directly, which then hipefully gives a clue.
Well it happened again.
Installing the latest update failed.
$ sudo apt upgrade
Upgrading:
armbian-firmware
Summary:
Upgrading: 1, Installing: 0, Removing: 0, Not Upgrading: 0
Download size: 0 B / 34.6 MB
Space needed: 9196 kB / 13.2 GB available
Continue? [Y/n]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = (unset),
LC_NUMERIC = "en_GB.UTF-8",
LC_COLLATE = (unset),
LC_TIME = "nl_NL.UTF-8",
LC_MESSAGES = (unset),
LC_MONETARY = "nl_NL.UTF-8",
LC_ADDRESS = "nl_NL.UTF-8",
LC_IDENTIFICATION = "en_GB.UTF-8",
LC_MEASUREMENT = "nl_NL.UTF-8",
LC_PAPER = "nl_NL.UTF-8",
LC_TELEPHONE = "nl_NL.UTF-8",
LC_NAME = "en_GB.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
(Reading database ... 19804 files and directories currently installed.)
Preparing to unpack .../armbian-firmware_26.08.0-trunk-dietpi2_all.deb ...
Unpacking armbian-firmware (26.08.0-trunk-dietpi2) over
(26.08.0-trunk-dietpi1) ...
dpkg-deb (subprocess): decompressing archive
'/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb'
(size=34551012) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
(--unpack):
cannot copy extracted data for
'./lib/firmware/ath11k/WCN6855/hw2.0/amss.bin' to
'/lib/firmware/ath11k/WCN6855/hw2.0/amss.bin.dpkg-new': unexpected end
of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
Error: Sub-process /usr/bin/dpkg returned an error code (1)
And this time running dpkg -i dit not work.
$ sudo dpkg -i
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
$ sudo dpkg -i
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
(Reading database ... 19804 files and directories currently installed.)
Preparing to unpack .../armbian-firmware_26.08.0-trunk-dietpi2_all.deb ...
Unpacking armbian-firmware (26.08.0-trunk-dietpi2) over
(26.08.0-trunk-dietpi1) ...
dpkg-deb (subprocess): decompressing archive
'/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb'
(size=34551012) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
(--install):
cannot copy extracted data for
'./lib/firmware/ath12k/WCN7860/hw2.0/m3.bin' to
'/lib/firmware/ath12k/WCN7860/hw2.0/m3.bin.dpkg-new': unexpected end of
file or stream
Errors were encountered while processing:
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
$ sudo dmesg -l 0,1,2,3
[ 0.919897] mdio_bus mdio_mux-0.1: MDIO device at address 1 is missing.
[ 0.969583] WCN_ERR: dts node for bt_wake not found
Any hints?
.F
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = (unset),
LC_NUMERIC = “en_GB.UTF-8”,
LC_COLLATE = (unset),
LC_TIME = “nl_NL.UTF-8”,
LC_MESSAGES = (unset),
LC_MONETARY = “nl_NL.UTF-8”,
LC_ADDRESS = “nl_NL.UTF-8”,
LC_IDENTIFICATION = “en_GB.UTF-8”,
LC_MEASUREMENT = “nl_NL.UTF-8”,
LC_PAPER = “nl_NL.UTF-8”,
LC_TELEPHONE = “nl_NL.UTF-8”,
LC_NAME = “en_GB.UTF-8”,
LANG = “C.UTF-8”
Your locales are very much a mess, some unset, some not compiled. Do you somehow assign them individually somewhere, and intentionally mix Netherlands, Great Britain, and international C locales?
To me it looks like you want to use Netherlands locales, hence choose that via dietpi-config > Language/Regional Options > Locale once, and remove any possible custom variable assignment.
Possible that this has some subtile effect on dpkg as well.
I don’t think that is related to the issue.
The problem is that the .deb for the firmware update either is corrupted
or the process get interrupted causing the job to crash.
As described before, the previous times manually running the dpkg -i on
the deb would get it back on track. Not this time.
.F
The latter. The deb is fine. Something breaks when your dpkg tries to extract, most of the time. I guess you can just retry manual dpkg -i and it will randomly sometimes work, sometimes fail.
Probably the locales issue is unrelated, but you should fix that in any case.
$ sudo dpkg -i
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
(Reading database … 19804 files and directories currently installed.)
Preparing to unpack …/armbian-firmware_26.08.0-trunk-dietpi2_all.deb …
Unpacking armbian-firmware (26.08.0-trunk-dietpi2) over
(26.08.0-trunk-dietpi1) …
dpkg-deb (subprocess): decompressing archive
‘/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb’
(size=34551012) member ‘data.tar’: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess returned error exit status 2
dpkg: error processing archive
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
(–install):
cannot copy extracted data for
‘./lib/firmware/ath11k/WCN6855/hw2.0/amss.bin’ to
‘/lib/firmware/ath11k/WCN6855/hw2.0/amss.bin.dpkg-new’: unexpected end
of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
the locals issue was not an issue for the firmware installe update…
Howto check the correctness of the deb file?
and where to download it manually?
APT would have thrown an error if the downloaded package wouldn’t match the SHA512 signature from the package list.
See the list here: https://dietpi.com/apt/dists/all/nanopineoplus2/binary-all/Packages
For the latest package at the bottom you see the expected size and hash:
Size: 34551012
SHA256: 34d314b431eeaa2fdac5e03ebe57727fbc851fa0e12113ea92232223bec8c380
From your logs, you see already that the size is the expected 34551012 bytes. You can check the hash with:
sha256sum /var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
If either size or hash do not match this metadata, APT will throw a respective error and deny to proceed. Likewise, the hash and size of the Packages file needs to match the ones listed in the repos Release/InRelease, which is signed by a key where the counter-part for verification is stored in /etc/apt/tristed.gpg.d: https://dietpi.com/apt/dists/all/InRelease
This is the basic security concept of APT to protect against manipulated or damaged packages. Hence any damage of a package (which installs fine elsewhere) must have happened after the download, and after APT checked size and hash of the download. So I am sure, the damage happens in the data stream, while the package is extracted.
Just keep trying dpkg -i a few more times. When you reported the issue the first time, APT failed at first as well, later succeeded on one package, while dpkg -i succeeded on the other. So it is sort of random, maybe depending on some other system state, like RAM or swap usage/state.
Once the installation succeeded, I’d suggest to reinstall some related packages, like dpkg, tar, liblzma5. Maybe there is an issue with one of these.
For the latest package at the bottom you see the expected size and hash:
Size: 34551012 SHA256:
34d314b431eeaa2fdac5e03ebe57727fbc851fa0e12113ea92232223bec8c380 |
From your logs, you see already that the size is the expected |
34551012| bytes. You can check the hash with:
sha256sum /var/cache/apt/archives/armbian-firmware_26.08.0-trunk-
dietpi2_all.deb |
That seems to match the data found on the device
$ sha256sum
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
34d314b431eeaa2fdac5e03ebe57727fbc851fa0e12113ea92232223bec8c380
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
$ ls -l
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
-rw-r–r-- 1 root root 34551012 Jul 24 19:00
/var/cache/apt/archives/armbian-firmware_26.08.0-trunk-dietpi2_all.deb
Once the installation succeeded, I’d suggest to reinstall some related packages, like dpkg, tar, liblzma5. Maybe there is an issue with one of these.
As the dpkg -i refysed to work, I one by onw reinstalled the packages
you suggested.
reinstalling liblzma5 made no change to the dpkg -i
reinstalling tar however made everything fly again.
I’'l keep those in mind for the next round 
Thanks for the feedback !
.F
Ah great, whether it was coincidence or really the culprit.
maybe both, like life itself 