TL;DR: This is a building issue with the application, the application was incorrectly built and linked against libdl.so. For Linux support, the software must be rebuilt and linked to libdl.so.2 instead.

In this specific stack trace, the crash is in the C# pythonnet stack, fixed in pythonnet >= 3.0

More Explanation:

This is the standard glibc library. It's often linked automatically when binaries are created or it's often hardcoded in specific builds (the library is used to load further libraries).

The library is libdl.so.2 in Linux distributions (Debian, RHEL, Ubuntu, etc...). It was historically libdl.so in older operating systems and Unix variants.

Both have been coexisting for a while and causing confusion:

  • On CentOS, libdl.so can be installed by sudo yum install glibc-devel
  • On Debian and Ubuntu <=20, libdl.so can be installed by sudo apt-get install libc6-dev
  • On Ubuntu >= 22, libdl.so no longer exists, it can't be installed by libc6-dev (nor gcc).

The dev glibc package is a transitive dependency of gcc. It's very common for gcc to be installed on Linux machines (developer machines and end-user machines alike), so it's very common for libdl.so to be accidentally available. It's not part of the base operating system and should not be expected to be available.

Software that have been linked to libdl.so will crash when the library is not available. It's a long standing issue. It's getting more noticeable due to Ubuntu 22 lately, it was only noticeable in containers and minimal OS install before (no gcc).

In this specific stack trace, the crash was in the C# pythonnet stack, the linking was fixed in pythonnet >= 3.0

Answer from user5994461 on Stack Overflow
Top answer
1 of 1
5

TL;DR: This is a building issue with the application, the application was incorrectly built and linked against libdl.so. For Linux support, the software must be rebuilt and linked to libdl.so.2 instead.

In this specific stack trace, the crash is in the C# pythonnet stack, fixed in pythonnet >= 3.0

More Explanation:

This is the standard glibc library. It's often linked automatically when binaries are created or it's often hardcoded in specific builds (the library is used to load further libraries).

The library is libdl.so.2 in Linux distributions (Debian, RHEL, Ubuntu, etc...). It was historically libdl.so in older operating systems and Unix variants.

Both have been coexisting for a while and causing confusion:

  • On CentOS, libdl.so can be installed by sudo yum install glibc-devel
  • On Debian and Ubuntu <=20, libdl.so can be installed by sudo apt-get install libc6-dev
  • On Ubuntu >= 22, libdl.so no longer exists, it can't be installed by libc6-dev (nor gcc).

The dev glibc package is a transitive dependency of gcc. It's very common for gcc to be installed on Linux machines (developer machines and end-user machines alike), so it's very common for libdl.so to be accidentally available. It's not part of the base operating system and should not be expected to be available.

Software that have been linked to libdl.so will crash when the library is not available. It's a long standing issue. It's getting more noticeable due to Ubuntu 22 lately, it was only noticeable in containers and minimal OS install before (no gcc).

In this specific stack trace, the crash was in the C# pythonnet stack, the linking was fixed in pythonnet >= 3.0

Discussions

`libdl.so` not found in search path and causes a crash
Description Trying out the .NET 6 preview 4, I'm not able to run my application anymore due to a crash. Configuration .NET 6 preview 4 installed from snap Ubuntu 20.04 LTS, x64 Regression? Work... More on github.com
🌐 github.com
28
May 26, 2021
dll - libdl.so not found on Ubuntu EC2 instance - Stack Overflow
I am new to Ubuntu and am running Ubuntu in the Amazon EC2 cloud. I am trying to compile cppunit on the Ubuntu boxes (i386 and amd64) and it will not link to libdl g++ -g -O2 -o .libs/DllPlugInTe... More on stackoverflow.com
🌐 stackoverflow.com
Shared object "libdl.so.1" not found, required by "bash" | The FreeBSD Forums
Hi Yesterday, i was upgrade the package by below "pkg upgrade -f" After that, loggedout from putty. After few mints later, unable to login via putty. after successful login putty automatically closed. after checking from low permission user,below file was not found, Shared object "libdl.so.1"... More on forums.freebsd.org
🌐 forums.freebsd.org
November 16, 2018
Built executable won't run on Linux - libdl.so not found - Unity Engine - Unity Discussions
I have a problem where a successfully built Unity game won’t run on Ubuntu 18.04 LTS. The problem seems to be connected to the linker, which can’t be found. The app crashes after the splash screen. An excerpt from the Player.log file: I do have libdl.so installed. More on forum.unity.com
🌐 forum.unity.com
0
December 2, 2019
🌐
GitHub
github.com › dotnet › runtime › issues › 53291
`libdl.so` not found in search path and causes a crash · Issue #53291 · dotnet/runtime
May 26, 2021 - libdl.so not found in search path and causes a crash#53291 · Copy link · Labels · area-AssemblyLoader-coreclr · vadi2 · opened · on May 26, 2021 · Issue body actions · Trying out the .NET 6 preview 4, I'm not able to run my application anymore due to a crash.
Author   dotnet
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
[SOLVED] Missing libdl.so.2 Error during installation - Linux Mint Forums
April 13, 2010 - To fix this problem the user needs to install the GNOME desktop environment to obtain the gnome-libs-1.4.1.2.90-34.1.i386.rpm package with the libdb library file or if they have a subscription service the compat-db-4.0.14-5.1.i386.rpm from the RHN web site. Is there a similar .deb package in Mint?
🌐
FreeBSD
forums.freebsd.org › ports and packages › installation and maintenance of ports or packages
Shared object "libdl.so.1" not found, required by "bash" | The FreeBSD Forums
November 16, 2018 - That's really not a good idea, and you just learned why that is so. How to fix... Boot in single user mode (press 's' on the boot menu) and then the system will ask what shell to use, with the default being /bin/sh.
🌐
Gentoo Forums
forums.gentoo.org › board index › assistance › installing gentoo
[Solved]Error with libdl.so not found. - Gentoo Forums
July 3, 2004 - I should be able to rebuild the whole system with the source I've already downloaded before, no need to get the latest versions. -- If this is possible, what exact command should I use then? ... In the process of re-install my gentoo system, I found out what was causing the problem. I was following a tech. notes from Dante and added the following two lines into my /etc/bashrc file: ... LD_PRELOAD="libdl.so libdsocks.so" export LD_PRELOAD And that is the cause of all the problems I was experiencing.
Find elsewhere
🌐
Unity
forum.unity.com › unity engine
Built executable won't run on Linux - libdl.so not found - Unity Engine - Unity Discussions
December 2, 2019 - I have a problem where a successfully built Unity game won’t run on Ubuntu 18.04 LTS. The problem seems to be connected to the linker, which can’t be found. The app crashes after the splash screen. An excerpt from the Player.log file: I do have libdl.so installed.
🌐
Ubuntu
bugs.launchpad.net › ubuntu › +source › glibc › +bug › 1951340
Bug #1951340 “libdl.so missing in impish and jammy” : Bugs : glibc package : Ubuntu
November 18, 2021 - There's nothing to fix in glibc itself. What we need to do is to identify references to libdl.so in all Makefiles, and then just rebuild these packages.
🌐
GitHub
github.com › cirruslabs › cirrus-ci-docs › issues › 110
FreeBSD 11.1: Shared object "libdl.so.1" not found · Issue #110 · cirruslabs/cirrus-ci-docs
December 24, 2018 - Having run pkg install python3 I would have expected the freebsd-11-1-release-amd64 virtual machine to install python3 with all its dependencies. However, when invoking python3 I get the following error: Shared object "libdl.so.1" not fo...
Author   cirruslabs
🌐
FreeBSD
forums.freebsd.org › desktop usage › multimedia/gaming
Shared object "libdl.so.2" not found, required by "libnvidia-encode.so.1" : where to find the correct version of libdl.so.2 ? | The FreeBSD Forums
January 4, 2024 - 1. there's no libdl in FreeBSD, dlopen(3) and friends are part of FreeBSD's libc. 2. FreeBSD's libc is at ABI version 7 (libc.so.7) and certainly doesn't have any GLIBC_* symbol versions.
🌐
Google Groups
groups.google.com › g › linux.debian.maint.glibc › c › cS8vC58zzx4
Bug#1060233: libc6: Missing libdl.so
January 8, 2024 - The file > /usr/lib/x86_64-linux-gnu/libdl.so.2 > is provided, but there is no symlink > .../libdl.so -> .../libdl.so.2 > > Easily corrected with command: > ln -s libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so > > At bullseye, libdl.so.2 was in package libc6, while the symlink libdl.so > was in libc6-dev Starting with glibc 2.34, libdl is an empty library. Therefore only a libdl.a is provided to support linking with -ldl. > (which seems somewhat wrong already).
🌐
FreeBSD
forums.freebsd.org › ports and packages › installation and maintenance of ports or packages
Shared object "libdl.so.1" not found, required by "vim" | The FreeBSD Forums
November 13, 2018 - root@c2:~# ll /usr/lib/libdl.so.1 -r--r--r-- 1 root wheel 6160 Jul 4 11:29 /usr/lib/libdl.so.1 So it looks like you didn't quite finish the upgrade.
🌐
Unity
issuetracker.unity3d.com › issues › missing-libdl-dot-so-library-causes-crash-when-entering-playmode-for-the-second-time-or-closing-the-editor
Unity Issue Tracker - [Linux] Missing libdl.so library causes crash when entering Playmode for the second time or closing the Editor
April 14, 2020 - Notes: 1. Sometimes it can take more than 2 times of entering and leaving Playmode for the crash to occur and it is also possible for the Editor not to crash when closing it 2. There are two errors thrown when opening the Editor that are related to the crash: a. "DllNotFoundException: libdl.so" b.
🌐
USC
neuroimage.usc.edu › discussions
DUNEURO error libdl.so.2 - Discussions - Brainstorm
May 18, 2020 - Hi everyone, I was trying to use DUNEURO for the FEM forward model but I have the following error: DUNEURO> Installation path: /home/duma/.brainstorm/bst_duneuro/bin/bst_duneuro_meeg_linux64 DUNEURO> Writing temporary files to: /home/duma/.brainstorm/tmp DUNEURO> System call: "/home/duma/.brainstorm/bst_duneuro/bin/bst_duneuro_meeg_linux64" "/home/duma/.brainstorm/tmp/duneuro_minifile.mini" DUNEURO> Error log: /home/duma/.brainstorm/bst_duneuro/bin/bst_duneuro_meeg_linux64: error while load...
🌐
GitHub
github.com › benjamimgois › goverlay › issues › 4
Getting "can't get libdl.so" in Pop!_OS 22.04 · Issue #4 · benjamimgois/goverlay
July 25, 2022 - Hi, I tried to install GOverlay through the Pop!_Shop but unfortunately I wasn't able to even start the program. I ran goverlay it in the terminal, and I got the message: can't get libdl.so. Is the...
Author   benjamimgois