You can simply create a symbolic link like so:

$ whereis libdl.so.2
libdl.so.2: /usr/lib/libdl.so.2 /usr/lib32/libdl.so.2
$ sudo ln -s /usr/lib/libdl.so.2 /usr/lib/libdl.so
$ sudo ln -s /usr/lib32/libdl.so.2 /usr/lib32/libdl.so

In my case that's enough for MonoGame.

Answer from mukhinid on Stack Exchange
🌐
Ask Ubuntu
askubuntu.com › questions › 987740 › how-to-install-dl
16.04 - How to install dl - Ask Ubuntu
December 19, 2017 - $ sudo aptitude install libc6-dev libc6-dev is already installed at the requested version (2.23-0ubuntu9) libc6-dev is already installed at the requested version (2.23-0ubuntu9) No packages will be installed, upgraded, or removed.
🌐
Ubuntu
packages.ubuntu.com › search
Ubuntu – Package Contents Search Results -- libdl.so
You have searched for paths that end with libdl.so in suite trusty, all sections, and all architectures.
Discussions

linux - How to address crash due to missing libdl.so on Ubuntu 22? - Stack Overflow
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 More on stackoverflow.com
🌐 stackoverflow.com
dll - libdl.so not found on Ubuntu EC2 instance - Stack Overflow
ubuntu@domU-12-31-39-0A-98-1A:~/cppunit$ ls /lib/i386-linux-gnu/libdl* /lib/i386-linux-gnu/libdl-2.15.so /lib/i386-linux-gnu/libdl.so.2 ... ubuntu@domU-12-31-39-0A-98-1A:~/cppunit$ sudo apt-get install libc6 Reading package lists... Done Building dependency tree Reading state information... More on stackoverflow.com
🌐 stackoverflow.com
Unable to load shared library 'libdl'
I created the tutorial application. I then expanded it with some use of ImGui. Everything works as expected on windows. I created a publish profile for a self contained linux-x64 that targeted Rele... More on github.com
🌐 github.com
1
December 11, 2018
Getting "can't get libdl.so" in Pop!_OS 22.04
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... More on github.com
🌐 github.com
35
July 25, 2022
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

🌐
Ubuntu
packages.ubuntu.com › search
Ubuntu – Package Contents Search Results -- libdl.so.2
You have searched for files named libdl.so.2 in suite artful, all sections, and all architectures.
🌐
Google Groups
groups.google.com › g › c-rtmp-server › c › IFQ6XRN0qIo
how can I install libdl in Ubuntu
Hi all, I want to run CRTMPSERVER in Ubuntu 10.10, but I can not find the package of libdl. Could any one give me a help? Thanks very much Robin ... Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message ... it is already installed (as part of base installation) Вівторок, 3 квітня 2012 р., 14:54:41 UTC+3 користувач Robin написав:
🌐
Ubuntu Forums
ubuntuforums.org › showthread.php
libdl.so not found
July 6, 2012 - A help and support forum for Ubuntu Linux.
Find elsewhere
🌐
GitHub
github.com › veldrid › veldrid › issues › 143
Unable to load shared library 'libdl' · Issue #143 · veldrid/veldrid
December 11, 2018 - Exception: Unhandled Exception: Sytem.TypeInitializationException: The Type initializer for 'veldrid.sdl2.sdl2Native' threw an exception. --> system.dllnotfoundexception: Unable to load shared library 'libdl' at NativeLibraryLoader.libdl.dlopen . . at veldrid.startuputilities.veldridstartup.createwindow · OS: Ubuntu 18.04.1 LTS (Running on Oracle VM VirtualBox) through Windows 10.
Author   veldrid
🌐
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 there any workaround to this issue?
Author   benjamimgois
🌐
Installati.one
installati.one › home › how to install libdlpack-dev on ubuntu 22.04
How To Install libdlpack-dev on Ubuntu 22.04 | Installati.one
June 27, 2023 - In this tutorial we learn how to install libdlpack-dev package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.
🌐
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 - Configuring the installer for this system's environment... nawk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory /bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory Launching installer...
🌐
Howtoinstall.me
howtoinstall.me › ubuntu › 18-04 › libltdl-dev
How to Install libltdl-dev in Ubuntu 18.04 - HowToInstall
Ubuntu · 18.04 · libltdl-dev · Install libltdl-dev by entering the following commands in the terminal: sudo apt update sudo apt install libltdl-dev · Description: System independent dlopen wrapper for GNU libtool · This package contains the header files and static libraries for the libltdl ...
🌐
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
packages.ubuntu.com › xenial › libltdl-dev
Ubuntu – Error
two or more packages specified (libltdl-dev xenial) · Content Copyright © 2026 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site
🌐
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/....
🌐
GitHub
github.com › VahidN › EPPlus.Core › issues › 40
Getting the error "Unable to load DLL 'libdl'" on Ubuntu docker container with container image, microsoft/aspnetcore-build:2.0 Issue #40 · VahidN/EPPlus.Core
December 20, 2017 - I am trying to generate the excel sheet, using EPPlus.Core in dotnet core 2.0 framework. The generation works fine on local machine running windows. When I test the same on Ubuntu docker images, it fails with the below exception: Unable to load DLL 'libdl': The specified module or one of its dependencies could not be found.
Author   VahidN