I feel lucky in stumbling across this solution, but wanted to post it up in case anyone else runs across this issue in installing legacy software.

Assuming the install anywhere script is called Install.bin

# cp Install.bin Install.bak
# cat Install.bak | sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > Install.bin
# rm Install.bak

This worked nicely.

The fix was originally posted on the Zend Knowledgebase (now 404'ed), it is still archived on linuxquestions.org.

Answer from a coder on Stack Exchange
🌐
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?
Discussions

android - could not load library "libdl.so.2" - Stack Overflow
Thanks Alex. I already tried symlinking libdl.so to libdl.so.2 and it did not resolve the issue. More on stackoverflow.com
🌐 stackoverflow.com
error while loading shared libraries: libdl.so.2
I have download today the binary, but when I try to run it, it crashes: ./daedalus-4.6.0-mainnet-20052.bin ./nix/store/s74k20bgs8bm8267mifzxsmkgm2n94hb-nix-user-chroot-2c52b5f/bin/nix-user-chroo... More on github.com
🌐 github.com
24
January 3, 2022
[Mobile] Android load native onnxruntime library failure, error message: library "libdl.so.2" not found
[Mobile] Android load native onnxruntime library failure, error message: library "libdl.so.2" not found#19549 More on github.com
🌐 github.com
5
February 17, 2024
apt - Unable to load shared library 'libdl.so' or one of its dependencies - Unix & Linux Stack Exchange
When checking my system if the file actually exists with sudo find / -iname libdl.so the file is not found. Inside /usr/lib/i386-linux-gnu and /usr/lib/x86_64-linux-gnu I can however find a libdl.so.2 file, which sounds related. More on unix.stackexchange.com
🌐 unix.stackexchange.com
April 23, 2022
🌐
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.
🌐
GitHub
github.com › input-output-hk › daedalus › issues › 2802
error while loading shared libraries: libdl.so.2 · Issue #2802 · input-output-hk/daedalus
January 3, 2022 - <> locate libdl.so.2 /usr/lib/libdl.so.2 /usr/lib32/libdl.so.2 /var/lib/snapd/snap/core/11798/lib/i386-linux-gnu/libdl.so.2 /var/lib/snapd/snap/core/11798/lib/x86_64-linux-gnu/libdl.so.2 /var/lib/snapd/snap/core/11993/lib/i386-linux-gnu/libdl.so.2 /var/lib/snapd/snap/core/11993/lib/x86_64-linux-gnu/libdl.so.2
Author   input-output-hk
🌐
GitHub
github.com › microsoft › onnxruntime › issues › 19549
[Mobile] Android load native onnxruntime library failure, error message: library "libdl.so.2" not found · Issue #19549 · microsoft/onnxruntime
February 17, 2024 - java.lang.UnsatisfiedLinkError: dlopen failed: library "libdl.so.2" not found: needed by /data/app/~~M97AqPToZDDX4w2dlXmVEw==bQ==/base.apk!/lib/arm64-v8a/libonnxruntime.so in namespace classloader-namespace at java.lang.Runtime.loadLibrary0(Runtime.java:1077) at java.lang.Runtime.loadLibrary0(Runtime.java:998) at java.lang.System.loadLibrary(System.java:1661)
Author   microsoft
Find elsewhere
🌐
openSUSE Forums
forums.opensuse.org › english › applications
libdl.so.2 is not found by the linker. - Applications - openSUSE Forums
February 6, 2012 - On openSUSE 12.1 compiling gracegtk-0.4.5 or gracegtk-0.4.4, I obtain the following error message: /usr/lib64/gcc/x86_64-suse-linux/4.6/…/…/…/…/x86_64-suse-linux/bin/ld: dlmodule.o: undefined reference to symbol ‘dlclose@@GLIBC_2.2.5’ /usr/lib64/gcc/x86_64-suse-linux/4.6/…/…/…/…/x86_64-suse-linux/bin/ld: note: ‘dlclose@@GLIBC_2.2.5’ is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line /lib64/libdl.so.2: could not read symbols: Invalid operation collect2: ld returne...
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

🌐
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 › ied206 › Joveler.DynLoader › issues › 1
/usr/lib64/libdl.so.2, but no libdl.so · Issue #1 · ied206/Joveler.DynLoader
October 29, 2019 - In CentOS 7 /usr/lib64/libdl.so.2 exists, but not libdl.so. To resolve the issue, I created a symlink to /usr/lib64/libdl.so.2 as /usr/lib64/libdl.so. Is there a better way to solve this, maybe addig libdl.so.2 to the Posix NativeMethods...
Author   ied206
🌐
Linux Questions
linuxquestions.org › questions › linux-software-2 › passwd-error-while-loading-shared-libraries-libdl-so-2-a-4175500403
passwd: error while loading shared libraries: libdl.so.2
I am using Red Hat Enterprise Linux Server Release 6.4 (Santiago). I have a problem with the 'passwd' command. Everytime I call this command (in the
🌐
GitHub
github.com › conda › conda-build › issues › 3164
/lib64/libdl.so.2 ... not found in sysroot, is this binary repackaging? · Issue #3164 · conda/conda-build
September 23, 2018 - WARNING (shellcheck,bin/shellcheck): /lib64/librt.so.1 not found in sysroot, is this binary repackaging? .. do you need to use install_name_tool/patchelf? According to @jakirkham at least some libs, e.g. /lib64/libdl.so.2 are system provided and should not be reported.
Author   conda
🌐
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 - strace shows that it's trying to find libdl.so in all places except where it actually is (/lib/x86_64-linux-gnu/libdl.so.2):
Author   dotnet
🌐
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.
🌐
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.
🌐
Debian
packages.debian.org › cgi-bin › search_contents.pl
Debian -- Package Contents Search Results -- libdl.so.2
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser