curl: error while loading shared libraries

Having issues with your DietPi installation or found a bug? Post it here.
omavoss
Posts: 77
Joined: Thu Sep 24, 2020 11:08 pm

Re: curl: error while loading shared libraries

Post by omavoss »

@Joulinar:
I have already performed the procedure of uninstalling and installing curl three times without success.

Code: Select all

root@DietPi:~# G_AGP curl
[ INFO ] APT purge for: curl, please wait...
(Lese Datenbank ... 98955 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von curl (7.64.0-4+deb10u2) ...
[  OK  ] APT purge for: curl

root@DietPi:~# reboot
root@DietPi:~#
Using username "root".
root@192.168.115.30's password:
Linux DietPi 5.10.60-v7+ #1449 SMP Wed Aug 25 15:00:01 BST 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
 ─────────────────────────────────────────────────────
 DietPi v7.4.2 (beta) : 19:45 - So 12.09.2021
 ─────────────────────────────────────────────────────
 - Device model : RPi 3 Model B (armv7l)
 - Uptime : up 1 minute
 - CPU temp : WARNING: 70'C : 158'F (Reducing the life of your device)
 - LAN IP : 192.168.115.30 (eth0)
 - Freespace (RootFS) : 1,6G
 - Freespace (userdata) : 1,6G
/boot/dietpi/func/dietpi-banner: Zeile 245: curl: Kommando nicht gefunden.
 ─────────────────────────────────────────────────────

 
root@DietPi:~# G_AGI curl
[ INFO ] APT install for: curl, please wait...
Vormals nicht ausgewähltes Paket curl wird gewählt.
(Lese Datenbank ... 98947 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../curl_7.64.0-4+deb10u2_armhf.deb ...
Entpacken von curl (7.64.0-4+deb10u2) ...
curl (7.64.0-4+deb10u2) wird eingerichtet ...
[  OK  ] APT install for: curl

root@DietPi:~# curl --help
curl: error while loading shared libraries: libhogweed.so.6: cannot open shared object file: No such file or directory
root@DietPi:~#
Are there any other hints please?
Thank you very much.
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: curl: error while loading shared libraries

Post by Joulinar »

I don't have any other idea than competing the upgrade to Bullseye.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
alleyu2
Posts: 20
Joined: Sun May 03, 2020 8:52 am

Re: Failed to upgrade from Debian Buster to Bullseye

Post by alleyu2 »

Sorry for the trouble. My terminal just crashed during the apt upgrade and there was some issue upgrading again. I did a dietpi-restore and I am facing some issue with some of the libraries. For eg: when I run curl I get the following error

Code: Select all

curl: error while loading shared libraries: libhogweed.so.6: cannot open shared object file: No such file or directory
Same issue in Radarrr and Sonarr

Code: Select all

MediaInfo Library could not be loaded Unable to load shared library 'libmediainfo.so.0' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibmediainfo.so.0: cannot open shared object file: No such file or directory
Is this something to do with my environment variables? I did a find in my system for libhogweed.so.6, however, I was not able to find this library.
User avatar
MichaIng
Site Admin
Posts: 3216
Joined: Sat Nov 18, 2017 6:21 pm

Re: Failed to upgrade from Debian Buster to Bullseye

Post by MichaIng »

Can you please try:

Code: Select all

ldd $(which curl)
ldconfig
ldd $(which curl)
Somehow the linked libraries are noch changed back after restoring the backup, especially with curl we had this base before.
alleyu2
Posts: 20
Joined: Sun May 03, 2020 8:52 am

Re: Failed to upgrade from Debian Buster to Bullseye

Post by alleyu2 »

Here is the output

Code: Select all

ldd $(which curl)
        linux-vdso.so.1 (0xbed30000)
        /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6f66000)
        libcurl.so.4 => /usr/lib/arm-linux-gnueabihf/libcurl.so.4 (0xb6ed0000)
        libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6ea5000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6e7b000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d2d000)
        /lib/ld-linux-armhf.so.3 (0xb6f7b000)
        libnghttp2.so.14 => /usr/lib/arm-linux-gnueabihf/libnghttp2.so.14 (0xb6cfe000)
        libidn2.so.0 => /usr/lib/arm-linux-gnueabihf/libidn2.so.0 (0xb6cd2000)
        librtmp.so.1 => /usr/lib/arm-linux-gnueabihf/librtmp.so.1 (0xb6ca9000)
        libssh2.so.1 => /usr/lib/arm-linux-gnueabihf/libssh2.so.1 (0xb6c73000)
        libpsl.so.5 => /usr/lib/arm-linux-gnueabihf/libpsl.so.5 (0xb6c53000)
        libssl.so.1.1 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.1 (0xb6bd4000)
        libcrypto.so.1.1 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 (0xb69ba000)
        libgssapi_krb5.so.2 => /usr/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2 (0xb6970000)
        libkrb5.so.3 => /usr/lib/arm-linux-gnueabihf/libkrb5.so.3 (0xb68b5000)
        libk5crypto.so.3 => /usr/lib/arm-linux-gnueabihf/libk5crypto.so.3 (0xb6875000)
        libcom_err.so.2 => /lib/arm-linux-gnueabihf/libcom_err.so.2 (0xb6862000)
        libldap_r-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/libldap_r-2.4.so.2 (0xb680d000)
        liblber-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/liblber-2.4.so.2 (0xb67f1000)
        libunistring.so.2 => /usr/lib/arm-linux-gnueabihf/libunistring.so.2 (0xb6675000)
        libgnutls.so.30 => /usr/lib/arm-linux-gnueabihf/libgnutls.so.30 (0xb64d2000)
        libhogweed.so.6 => not found
        libnettle.so.8 => not found
        libgmp.so.10 => /usr/lib/arm-linux-gnueabihf/libgmp.so.10 (0xb6459000)
        libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0xb637f000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb636c000)
        libkrb5support.so.0 => /usr/lib/arm-linux-gnueabihf/libkrb5support.so.0 (0xb6352000)
        libkeyutils.so.1 => /lib/arm-linux-gnueabihf/libkeyutils.so.1 (0xb633e000)
        libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0xb631a000)
        libsasl2.so.2 => /usr/lib/arm-linux-gnueabihf/libsasl2.so.2 (0xb62f3000)
        libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0xb61ee000)
        libtasn1.so.6 => /usr/lib/arm-linux-gnueabihf/libtasn1.so.6 (0xb61ce000)
        libnettle.so.6 => /usr/lib/arm-linux-gnueabihf/libnettle.so.6 (0xb618a000)
        libhogweed.so.4 => /usr/lib/arm-linux-gnueabihf/libhogweed.so.4 (0xb614b000)
        libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0xb6121000)
        libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0xb6109000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb60dc000)
root@DietPi-Pi4:~# ldconfig
root@DietPi-Pi4:~# ldd $(which curl)
        linux-vdso.so.1 (0xbeff5000)
        /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6fac000)
        libcurl.so.4 => /usr/lib/arm-linux-gnueabihf/libcurl.so.4 (0xb6f16000)
        libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6eeb000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6ec1000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d73000)
        /lib/ld-linux-armhf.so.3 (0xb6fc1000)
        libnghttp2.so.14 => /usr/lib/arm-linux-gnueabihf/libnghttp2.so.14 (0xb6d44000)
        libidn2.so.0 => /usr/lib/arm-linux-gnueabihf/libidn2.so.0 (0xb6d18000)
        librtmp.so.1 => /usr/lib/arm-linux-gnueabihf/librtmp.so.1 (0xb6cef000)
        libssh2.so.1 => /usr/lib/arm-linux-gnueabihf/libssh2.so.1 (0xb6cb9000)
        libpsl.so.5 => /usr/lib/arm-linux-gnueabihf/libpsl.so.5 (0xb6c99000)
        libssl.so.1.1 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.1 (0xb6c1a000)
        libcrypto.so.1.1 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 (0xb6a00000)
        libgssapi_krb5.so.2 => /usr/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2 (0xb69b6000)
        libkrb5.so.3 => /usr/lib/arm-linux-gnueabihf/libkrb5.so.3 (0xb68fb000)
        libk5crypto.so.3 => /usr/lib/arm-linux-gnueabihf/libk5crypto.so.3 (0xb68bb000)
        libcom_err.so.2 => /lib/arm-linux-gnueabihf/libcom_err.so.2 (0xb68a8000)
        libldap_r-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/libldap_r-2.4.so.2 (0xb6853000)
        liblber-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/liblber-2.4.so.2 (0xb6837000)
        libunistring.so.2 => /usr/lib/arm-linux-gnueabihf/libunistring.so.2 (0xb66bb000)
        libgnutls.so.30 => /usr/lib/arm-linux-gnueabihf/libgnutls.so.30 (0xb6518000)
        libhogweed.so.6 => not found
        libnettle.so.8 => not found
        libgmp.so.10 => /usr/lib/arm-linux-gnueabihf/libgmp.so.10 (0xb649f000)
        libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0xb63c5000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb63b2000)
        libkrb5support.so.0 => /usr/lib/arm-linux-gnueabihf/libkrb5support.so.0 (0xb6398000)
        libkeyutils.so.1 => /lib/arm-linux-gnueabihf/libkeyutils.so.1 (0xb6384000)
        libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0xb6360000)
        libsasl2.so.2 => /usr/lib/arm-linux-gnueabihf/libsasl2.so.2 (0xb6339000)
        libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0xb6234000)
        libtasn1.so.6 => /usr/lib/arm-linux-gnueabihf/libtasn1.so.6 (0xb6214000)
        libnettle.so.6 => /usr/lib/arm-linux-gnueabihf/libnettle.so.6 (0xb61d0000)
        libhogweed.so.4 => /usr/lib/arm-linux-gnueabihf/libhogweed.so.4 (0xb6191000)
        libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0xb6167000)
        libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0xb614f000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6122000)
User avatar
MichaIng
Site Admin
Posts: 3216
Joined: Sat Nov 18, 2017 6:21 pm

Re: Failed to upgrade from Debian Buster to Bullseye

Post by MichaIng »

Strange, there is even another library linked which does not exist on Buster. As of something wrote those inside manually :?. A little down the list you see the two correct library versions.

Lets simply remove that faulty links manually. They are not part of the original Buster curl, so something also added then manually:
apt install patchelf

Code: Select all

patchelf --remove-needed libhogweed.so.6 $(which curl)
patchelf --remove-needed libnettle.so.8 $(which curl)
alleyu2
Posts: 20
Joined: Sun May 03, 2020 8:52 am

Re: Failed to upgrade from Debian Buster to Bullseye

Post by alleyu2 »

I executed the two commands but the problems persists. I tried reinstalling and rebooting the system but it still won't help. I still get the same error.

Code: Select all

curl: error while loading shared libraries: libhogweed.so.6: cannot open shared object file: No such file or directory
ldd output

Code: Select all

root@DietPi-Pi4:~# ldd $(which curl)
        linux-vdso.so.1 (0xbef00000)
        /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6ef1000)
        libcurl.so.4 => /usr/lib/arm-linux-gnueabihf/libcurl.so.4 (0xb6e5b000)
        libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6e30000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6e06000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6cb8000)
        /lib/ld-linux-armhf.so.3 (0xb6f06000)
        libnghttp2.so.14 => /usr/lib/arm-linux-gnueabihf/libnghttp2.so.14 (0xb6c89000)
        libidn2.so.0 => /usr/lib/arm-linux-gnueabihf/libidn2.so.0 (0xb6c5d000)
        librtmp.so.1 => /usr/lib/arm-linux-gnueabihf/librtmp.so.1 (0xb6c34000)
        libssh2.so.1 => /usr/lib/arm-linux-gnueabihf/libssh2.so.1 (0xb6bfe000)
        libpsl.so.5 => /usr/lib/arm-linux-gnueabihf/libpsl.so.5 (0xb6bde000)
        libssl.so.1.1 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.1 (0xb6b5f000)
        libcrypto.so.1.1 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 (0xb6945000)
        libgssapi_krb5.so.2 => /usr/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2 (0xb68fb000)
        libkrb5.so.3 => /usr/lib/arm-linux-gnueabihf/libkrb5.so.3 (0xb6840000)
        libk5crypto.so.3 => /usr/lib/arm-linux-gnueabihf/libk5crypto.so.3 (0xb6800000)
        libcom_err.so.2 => /lib/arm-linux-gnueabihf/libcom_err.so.2 (0xb67ed000)
        libldap_r-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/libldap_r-2.4.so.2 (0xb6798000)
        liblber-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/liblber-2.4.so.2 (0xb677c000)
        libunistring.so.2 => /usr/lib/arm-linux-gnueabihf/libunistring.so.2 (0xb6600000)
        libgnutls.so.30 => /usr/lib/arm-linux-gnueabihf/libgnutls.so.30 (0xb645d000)
        libhogweed.so.6 => not found
        libnettle.so.8 => not found
        libgmp.so.10 => /usr/lib/arm-linux-gnueabihf/libgmp.so.10 (0xb63e4000)
        libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0xb630a000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb62f7000)
        libkrb5support.so.0 => /usr/lib/arm-linux-gnueabihf/libkrb5support.so.0 (0xb62dd000)
        libkeyutils.so.1 => /lib/arm-linux-gnueabihf/libkeyutils.so.1 (0xb62c9000)
        libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0xb62a5000)
        libsasl2.so.2 => /usr/lib/arm-linux-gnueabihf/libsasl2.so.2 (0xb627e000)
        libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0xb6179000)
        libtasn1.so.6 => /usr/lib/arm-linux-gnueabihf/libtasn1.so.6 (0xb6159000)
        libnettle.so.6 => /usr/lib/arm-linux-gnueabihf/libnettle.so.6 (0xb6115000)
        libhogweed.so.4 => /usr/lib/arm-linux-gnueabihf/libhogweed.so.4 (0xb60d6000)
        libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0xb60ac000)
        libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0xb6094000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6067000)
omavoss
Posts: 77
Joined: Thu Sep 24, 2020 11:08 pm

dietpi-update failed

Post by omavoss »

Hello,
the following error message:

Code: Select all

Using username "root".
Linux DietPi 5.10.60-v7+ #1449 SMP Wed Aug 25 15:00:01 BST 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
 ─────────────────────────────────────────────────────
 DietPi v7.4.2 (beta) : 09:54 - Do 16.09.2021
 ─────────────────────────────────────────────────────
 - Device model : RPi 3 Model B (armv7l)
 - Uptime : up 1 hour, 42 minutes
 - CPU temp : 48'C : 118'F (Optimal temperature)
 - LAN IP : 192.168.115.30 (eth0)
 - Freespace (RootFS) : 1,6G
 - Freespace (userdata) : 1,6G
curl: error while loading shared libraries: libhogweed.so.6: cannot open shared                                                                                                                                object file: No such file or directory
 ─────────────────────────────────────────────────────

 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image by        : DietPi Core Team (pre-image: Raspbian Lite)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Patreon Legends : Camry2731
 Contribute      : https://dietpi.com/contribute.html
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

root@DietPi:~# dietpi-update

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for available DietPi update

[ INFO ] DietPi-Update | Getting latest version from: https://raw.githubusercontent.com/MichaIng/DietPi/beta/.update/version
curl: error while loading shared libraries: libhogweed.so.6: cannot open shared object file: No such file or directory
[FAILED] DietPi-Update | Unable to get latest version.
[ INFO ] DietPi-Update | Please check the target Git repository and your network connection, then rerun dietpi-update.
[ INFO ] DietPi-Update | If this error persists, please report at: https://github.com/MichaIng/DietPi/issues
[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:3 https://archive.raspberrypi.org/debian buster InRelease
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | No APT upgrades were found, not creating file: /run/dietpi/.apt_updates
root@DietPi:~#
What can I do?
Many greetings and thank you.
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: curl: error while loading shared libraries

Post by Joulinar »

@omavoss
there is no need to open an additional issue on this as you still have the challange with CURL. Therefore I moved your post into the existing one.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: curl: error while loading shared libraries

Post by Joulinar »

@alleyu2
pls could you try following

Code: Select all

G_AGP curl
apt install --reinstall libhogweed4
reboot
apt install curl
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply