apt-get error during updating DietPi

While trying to update to the newest DietPi Version, I get the following error. I don’t know how to fix it:

apt-get: relocation error: /lib/aarch64-linux-gnu/libsystemd.so.0: symbol program_invocat)ol_name version GLIBC_2.17 not defined in file libc.so.6 with link time reference

pls can you share the full output of

apt update && apt upgrade

I get the same output as already posted.

It would be helpful if you could share the entire output.

When using the command

apt update && apt upgrade

I get the output

apt: relocation error: /lib/aarch64-linux-gnu/libsystemd.so.0: symbol program_invocat)ol_name version GLIBC_2.17 not defined in file libc.so.6 with link time reference

there is no other output?

No, just the relocation error.

hmm could be an issue of the apt package. Maybe it would need to be reinstalled manually. What system you are running?

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname -a
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

I get the following outputs:

G_DIETPI_VERSION_CORE=7
G_DIETPI_VERSION_SUB=8
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
G_LIVE_PATCH_STATUS[1]='applied'
G_LIVE_PATCH_STATUS[2]='applied'

buster 0

uname: error while loading shared libraries: libc.so,�: cannot open shared object file: No such file or directory

RPi 3 Model B ( (Unsupported))

uhh looks like you have way more issues as you are not able to execute uname command. There as well is a library issue. Can you check for the libraries available

ls -la /lib/aarch64-linux-gnu/
drwxr-xr-x  4 root root   12288 Nov 13 22:37 .
drwxr-xr-x 15 root root    4096 Sep 14  2021 ..
drwxr-xr-x  3 root root    4096 Jul 17  2021 dhcpcd
-rwxr-xr-x  1 root root  136992 Sep  8  2021 ld-2.28.so
lrwxrwxrwx  1 root root      10 Sep  8  2021 ld-linux-aarch64.so.1 -> ld-2.28.so
-rw-r--r--  1 root root   14840 Sep  8  2021 libanl-2.28.so
lrwxrwxrwx  1 root root      14 Sep  8  2021 libanl.so.1 -> libanl-2.28.so
lrwxrwxrwx  1 root root      20 Mär 30  2019 libapparmor.so.1 -> libapparmor.so.1.6.0
-rw-r--r--  1 root root   76376 Mär 30  2019 libapparmor.so.1.6.0
lrwxrwxrwx  1 root root      17 Apr 25  2019 libaudit.so.1 -> libaudit.so.1.0.0
-rw-r--r--  1 root root  124784 Apr 25  2019 libaudit.so.1.0.0
lrwxrwxrwx  1 root root      17 Jan 10  2019 libblkid.so.1 -> libblkid.so.1.1.0
-rw-r--r--  1 root root  347040 Jan 10  2019 libblkid.so.1.1.0
-rw-r--r--  1 root root    6240 Sep  8  2021 libBrokenLocale-2.28.so
lrwxrwxrwx  1 root root      23 Sep  8  2021 libBrokenLocale.so.1 -> libBrokenLocale-2.28.so
lrwxrwxrwx  1 root root      15 Jul 10  2019 libbz2.so.1 -> libbz2.so.1.0.4
lrwxrwxrwx  1 root root      15 Jul 10  2019 libbz2.so.1.0 -> libbz2.so.1.0.4
-rw-r--r--  1 root root   74600 Jul 10  2019 libbz2.so.1.0.4
-rwxr-xr-x  1 root root 1439544 Sep  8  2021 libc-2.28.so
lrwxrwxrwx  1 root root      18 Jan 14  2019 libcap-ng.so.0 -> libcap-ng.so.0.0.0
-rw-r--r--  1 root root   22840 Jan 14  2019 libcap-ng.so.0.0.0
lrwxrwxrwx  1 root root      14 Feb  6  2019 libcap.so.2 -> libcap.so.2.25
-rw-r--r--  1 root root   22680 Feb  6  2019 libcap.so.2.25
lrwxrwxrwx  1 root root      17 Jan 10  2020 libcom_err.so.2 -> libcom_err.so.2.1
-rw-r--r--  1 root root   14184 Jan 10  2020 libcom_err.so.2.1
-rw-r--r--  1 root root   35080 Sep  8  2021 libcrypt-2.28.so
lrwxrwxrwx  1 root root      23 Aug 26  2019 libcryptsetup.so.12 -> libcryptsetup.so.12.4.0
-rw-r--r--  1 root root  355712 Aug 26  2019 libcryptsetup.so.12.4.0
lrwxrwxrwx  1 root root      16 Sep  8  2021 libcrypt.so.1 -> libcrypt-2.28.so
lrwxrwxrwx  1 root root      12 Sep  8  2021 libc.so.6 -> libc-2.28.so
-rw-r--r--  1 root root  440768 Jun 21  2019 libdevmapper.so.1.02.1
-rw-r--r--  1 root root   14560 Sep  8  2021 libdl-2.28.so
lrwxrwxrwx  1 root root      13 Sep  8  2021 libdl.so.2 -> libdl-2.28.so
lrwxrwxrwx  1 root root      25 Okt 25  2021 libdns-export.so.1104 -> libdns-export.so.1104.0.2
-rw-r--r--  1 root root 2132888 Okt 25  2021 libdns-export.so.1104.0.2
lrwxrwxrwx  1 root root      13 Jan 10  2020 libe2p.so.2 -> libe2p.so.2.3
-rw-r--r--  1 root root   36232 Jan 10  2020 libe2p.so.2.3
lrwxrwxrwx  1 root root      17 Sep 19  2019 libexpat.so.1 -> libexpat.so.1.6.8
-rw-r--r--  1 root root  190536 Sep 19  2019 libexpat.so.1.6.8
lrwxrwxrwx  1 root root      16 Jan 10  2020 libext2fs.so.2 -> libext2fs.so.2.4
-rw-r--r--  1 root root  348120 Jan 10  2020 libext2fs.so.2.4
lrwxrwxrwx  1 root root      17 Jan 10  2019 libfdisk.so.1 -> libfdisk.so.1.1.0
-rw-r--r--  1 root root  456312 Jan 10  2019 libfdisk.so.1.1.0
-rw-r--r--  1 root root   80168 Apr  6  2019 libgcc_s.so.1
lrwxrwxrwx  1 root root      19 Mai 29  2021 libgcrypt.so.20 -> libgcrypt.so.20.2.4
-rw-r--r--  1 root root  773144 Mai 29  2021 libgcrypt.so.20.2.4
lrwxrwxrwx  1 root root      22 Feb  1  2019 libgpg-error.so.0 -> libgpg-error.so.0.26.1
-rw-r--r--  1 root root  129144 Feb  1  2019 libgpg-error.so.0.26.1
lrwxrwxrwx  1 root root      17 Mai  5  2018 libhistory.so.7 -> libhistory.so.7.0
-rw-r--r--  1 root root   35136 Mai  5  2018 libhistory.so.7.0
lrwxrwxrwx  1 root root      17 Apr 10  2018 libidn.so.11 -> libidn.so.11.6.16
-rw-r--r--  1 root root  206720 Apr 10  2018 libidn.so.11.6.16
lrwxrwxrwx  1 root root      25 Okt 25  2021 libisc-export.so.1100 -> libisc-export.so.1100.0.0
-rw-r--r--  1 root root  446672 Okt 25  2021 libisc-export.so.1100.0.0
lrwxrwxrwx  1 root root      18 Mär  6  2019 libkeyutils.so.1 -> libkeyutils.so.1.8
-rw-r--r--  1 root root   18280 Mär  6  2019 libkeyutils.so.1.8
lrwxrwxrwx  1 root root      16 Jan 28  2019 liblzma.so.5 -> liblzma.so.5.2.4
-rw-r--r--  1 root root  150136 Jan 28  2019 liblzma.so.5.2.4
-rw-r--r--  1 root root  706720 Sep  8  2021 libm-2.28.so
-rw-r--r--  1 root root   18688 Sep  8  2021 libmemusage.so
lrwxrwxrwx  1 root root      15 Okt  5  2016 libmnl.so.0 -> libmnl.so.0.2.0
-rw-r--r--  1 root root   22448 Okt  5  2016 libmnl.so.0.2.0
lrwxrwxrwx  1 root root      17 Jan 10  2019 libmount.so.1 -> libmount.so.1.1.0
-rw-r--r--  1 root root  391600 Jan 10  2019 libmount.so.1.1.0
lrwxrwxrwx  1 root root      12 Sep  8  2021 libm.so.6 -> libm-2.28.so
lrwxrwxrwx  1 root root      17 Nov  2  2019 libncurses.so.6 -> libncurses.so.6.1
-rw-r--r--  1 root root  153464 Nov  2  2019 libncurses.so.6.1
lrwxrwxrwx  1 root root      18 Nov  2  2019 libncursesw.so.6 -> libncursesw.so.6.1
-rw-r--r--  1 root root  219000 Nov  2  2019 libncursesw.so.6.1
-rw-r--r--  1 root root   88992 Sep  8  2021 libnsl-2.28.so
lrwxrwxrwx  1 root root      14 Sep  8  2021 libnsl.so.1 -> libnsl-2.28.so
-rw-r--r--  1 root root   35536 Sep  8  2021 libnss_compat-2.28.so
lrwxrwxrwx  1 root root      21 Sep  8  2021 libnss_compat.so.2 -> libnss_compat-2.28.so
-rw-r--r--  1 root root   22808 Sep  8  2021 libnss_dns-2.28.so
lrwxrwxrwx  1 root root      18 Sep  8  2021 libnss_dns.so.2 -> libnss_dns-2.28.so
-rw-r--r--  1 root root   51640 Sep  8  2021 libnss_files-2.28.so
lrwxrwxrwx  1 root root      20 Sep  8  2021 libnss_files.so.2 -> libnss_files-2.28.so
-rw-r--r--  1 root root   18736 Sep  8  2021 libnss_hesiod-2.28.so
lrwxrwxrwx  1 root root      21 Sep  8  2021 libnss_hesiod.so.2 -> libnss_hesiod-2.28.so
-rw-r--r--  1 root root   47544 Sep  8  2021 libnss_nis-2.28.so
-rw-r--r--  1 root root   55704 Sep  8  2021 libnss_nisplus-2.28.so
lrwxrwxrwx  1 root root      22 Sep  8  2021 libnss_nisplus.so.2 -> libnss_nisplus-2.28.so
lrwxrwxrwx  1 root root      18 Sep  8  2021 libnss_nis.so.2 -> libnss_nis-2.28.so
lrwxrwxrwx  1 root root      17 Feb 20  2020 libpamc.so.0 -> libpamc.so.0.82.1
-rw-r--r--  1 root root   14496 Feb 20  2020 libpamc.so.0.82.1
lrwxrwxrwx  1 root root      21 Feb 20  2020 libpam_misc.so.0 -> libpam_misc.so.0.82.1
-rw-r--r--  1 root root   14496 Feb 20  2020 libpam_misc.so.0.82.1
lrwxrwxrwx  1 root root      16 Feb 20  2020 libpam.so.0 -> libpam.so.0.84.2
-rw-r--r--  1 root root   60000 Feb 20  2020 libpam.so.0.84.2
lrwxrwxrwx  1 root root      18 Apr 15  2019 libparted.so.2 -> libparted.so.2.0.1
-rw-r--r--  1 root root  315408 Apr 15  2019 libparted.so.2.0.1
-rw-r--r--  1 root root    6192 Sep  8  2021 libpcprofile.so
lrwxrwxrwx  1 root root      17 Mär  7  2019 libpcre.so.3 -> libpcre.so.3.13.3
-rw-r--r--  1 root root  403336 Mär  7  2019 libpcre.so.3.13.3
lrwxrwxrwx  1 root root      18 Mai 31  2018 libprocps.so.7 -> libprocps.so.7.1.0
-rw-r--r--  1 root root   71576 Mai 31  2018 libprocps.so.7.1.0
-rwxr-xr-x  1 root root  151656 Sep  8  2021 libpthread-2.28.so
lrwxrwxrwx  1 root root      18 Sep  8  2021 libpthread.so.0 -> libpthread-2.28.so
lrwxrwxrwx  1 root root      18 Mai  5  2018 libreadline.so.7 -> libreadline.so.7.0
-rw-r--r--  1 root root  296712 Mai  5  2018 libreadline.so.7.0
-rw-r--r--  1 root root   80616 Sep  8  2021 libresolv-2.28.so
lrwxrwxrwx  1 root root      17 Sep  8  2021 libresolv.so.2 -> libresolv-2.28.so
-rw-r--r--  1 root root   31576 Sep  8  2021 librt-2.28.so
lrwxrwxrwx  1 root root      13 Sep  8  2021 librt.so.1 -> librt-2.28.so
-rw-r--r--  1 root root   10400 Sep  8  2021 libSegFault.so
-rw-r--r--  1 root root  138856 Jun 29  2018 libselinux.so.1
-rw-r--r--  1 root root  631408 Mai 28  2018 libsepol.so.1
lrwxrwxrwx  1 root root      17 Jan 20  2019 libslang.so.2 -> libslang.so.2.3.2
-rw-r--r--  1 root root 1503104 Jan 20  2019 libslang.so.2.3.2
lrwxrwxrwx  1 root root      21 Jan 10  2019 libsmartcols.so.1 -> libsmartcols.so.1.1.0
-rw-r--r--  1 root root  223264 Jan 10  2019 libsmartcols.so.1.1.0
lrwxrwxrwx  1 root root      12 Jan 10  2020 libss.so.2 -> libss.so.2.0
-rw-r--r--  1 root root   26480 Jan 10  2020 libss.so.2.0
lrwxrwxrwx  1 root root      20 Jul  8  2021 libsystemd.so.0 -> libsystemd.so.0.25.0
-rw-r--r--  1 root root  639624 Jul  8  2021 libsystemd.so.0.25.0
-rw-r--r--  1 root root   35584 Sep  8  2021 libthread_db-1.0.so
lrwxrwxrwx  1 root root      19 Sep  8  2021 libthread_db.so.1 -> libthread_db-1.0.so
lrwxrwxrwx  1 root root      15 Nov  2  2019 libtinfo.so.6 -> libtinfo.so.6.1
-rw-r--r--  1 root root  187528 Nov  2  2019 libtinfo.so.6.1
lrwxrwxrwx  1 root root      17 Jul  8  2021 libudev.so.1 -> libudev.so.1.6.13
-rw-r--r--  1 root root  145576 Jul  8  2021 libudev.so.1.6.13
lrwxrwxrwx  1 root root      19 Mai  5  2018 libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
-rw-r--r--  1 root root   92992 Mai  5  2018 libusb-1.0.so.0.1.0
-rw-r--r--  1 root root   14672 Sep  8  2021 libutil-2.28.so
lrwxrwxrwx  1 root root      15 Sep  8  2021 libutil.so.1 -> libutil-2.28.so
lrwxrwxrwx  1 root root      16 Jan 10  2019 libuuid.so.1 -> libuuid.so.1.3.0
-rw-r--r--  1 root root   30712 Jan 10  2019 libuuid.so.1.3.0
lrwxrwxrwx  1 root root      14 Sep 25  2017 libz.so.1 -> libz.so.1.2.11
-rw-r--r--  1 root root  117032 Sep 25  2017 libz.so.1.2.11
drwxr-xr-x  2 root root    4096 Jan 21  2021 security

Probably there is a file corruption. Let’s try to reinstall one of the libraries

cd /tmp
curl -sSfLO 'https://deb.debian.org/debian/pool/main/s/systemd/libsystemd0_241-7~deb10u8_arm64.deb'
dpkg -i libsystemd0_241-7~deb10u8_arm64.deb
rm libsystemd0_241-7~deb10u8_arm64.deb

Then test whether it works again:

apt-get update

I get the following error:

root@DietPi:/tmp# dpkg -i libsystemd0_241-7~deb10u8_arm64.deb

/bin/tar: 1: /bin/tar: ELF�A: not found
/bin/tar: 1: /bin/tar: �@: not found
/bin/tar: 1: /bin/tar:  not found
/bin/tar: 1: /bin/tar: @: not found
/bin/tar: 4: /bin/tar: Syntax error: "(" unexpected
dpkg-deb: Fehler: »tar«-Unterprozess gab den Fehlerwert 2 zurück
dpkg: Fehler beim Bearbeiten des Archivs libsystemd0_241-7~deb10u8_arm64.deb (--install):
 »dpkg-deb --control«-Unterprozess gab den Fehlerwert 2 zurück
Fehler traten auf beim Bearbeiten von:
 libsystemd0_241-7~deb10u8_arm64.deb

this doesn’t seems to be healthy at all. Looks like your system has significant data corruption. Let’s try some file system check

> /forcefsck
reboot
# then after reboot
journalctl -t systemd-fsck

/forcefsck command is not working. I think the whole installation is corrupted. It’s not the first time that the SD Card broke…

This was not a command. It should create a file inside the root directory. Pls copy the whole line as is :wink:

> /forcefsck

After reboot executing the second command I get “Memory access error”

you are not able to run journalctl?

Executing the command results in the memory access error

MichaIng any further ideas? Looks like installation is damaged quite a lot

FelixBrenkel
For the future, you might think of using some USB pen drived or HDD/SSD to boot your system of. This could help to avoid issues with SD cards as they are no longer used :wink: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#usb-mass-storage-boot