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 Exchangeandroid - could not load library "libdl.so.2" - Stack Overflow
error while loading shared libraries: libdl.so.2
[Mobile] Android load native onnxruntime library failure, error message: library "libdl.so.2" not found
apt - Unable to load shared library 'libdl.so' or one of its dependencies - Unix & Linux Stack Exchange
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.
First step, you should check which libraries (with exact versions) are required for the build.
The dl library is now part of the C standard library. The release notes, tells that, starting from version 2.34, which is yours,
...all functionality formerly implemented in the libraries libpthread, libdl, libutil, libanl has been integrated into libc. New applications do not need to link with -lpthread, -ldl, -lutil, -lanl anymore. For backwards compatibility, empty static archives libpthread.a, libdl.a, libutil.a, libanl.a are provided, so that the linker options keep working. Applications which have been linked against glibc 2.33 or earlier continue to load the corresponding shared objects (which are now empty).
This means that you have to pick an older version of the libc library (before 2.34), typically on an older OS version, or if you know what you are doing, tweak your Makefile (to remove the explicit libdl.so requirement).
I also ran into this on 64bit ubuntu, gcc 4.6.3, my hunch was the ordering of link lib. However, the same thing builds on 32bit. I added -ldl at the end of the link command and it linked, so looks like some sort of linker issue. You can also set env var: LIBS=-ldl, from shell and it will build.
Because ld.so.conf is for the dynamic linker, not the post-assembly linker, ld(1). Someone created this new path, but did not update the directories that the linker searches. there should be a link in /lib64 or /usr/lib64 for libdl, or one of the the paths that the linker searches for linking 64bit objects.
This (new path) is another example, from my PoV, of random changes that various Linux distros make without fully understanding the consequences or history.