Uncategorized

Lost Dynamic Linker Configuration on FreeBSD

Troubleshooting Dynamic Linker

In this article we will go over how you can determine if your operating system has lost its current ELF cache. In my example I will be using a FreeBSD based system so the shared ELF library cache file is located here: /var/run/ld-elf.so.hints. This is one of the files that is affected when performing the task below

Uh Oh …. The Error!

Many times when this error happens you will notice that many of you commands don’t work. They will output errors which indicate that that are missing Shared object. Below I have added an example of this when trying to run the postqueue command:

postqueue -p

/libexec/ld-elf.so.1: Shared object “libpcre.so.0″ not found, required by “postqueue”

Verifying  the issue

As a result of a Shared object not being found by the system, one way to determine if the libraries are being referenced by the dynamic linker is by running the following command:

ldconfig -r

/var/run/ld-elf.so.hints:

        search directories:

The output of this will show that no directories are being referenced by the dynamic linker. This is the problem which is causing the system to not recognize the commands being input.

Reloading library paths

To reload the library paths is actually a pretty simple task. Perform the following command to reload the library paths:

/etc/rc.d/ldconfig start

Once the libraries have been loaded, running ldconfig -r will provide the proper output. I have provided an example of part of the output:

ldconfig -r | head -n 5
/var/run/ld-elf.so.hints:
search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/compat/pkg:/usr/local/lib/compat:/usr/local/lib/ffmpeg1:/usr/local/lib/mysql
0:-lalias.7 => /lib/libalias.so.7
1:-lncursesw.8 => /lib/libncursesw.so.8
2:-lavl.2 => /lib/libavl.so.2

In conclusion ….

If you ever have an issue with multiple commands on a system displaying shared objects not being found, more than likely there is issue with your how your shared libraries are being read on your system. Hopefully this provides a little insight on how to resolve this possible issue that may arise on your system.

Related Articles

  • Intro to jQuery, Part II – Events

    Introduction Welcome! In the first part of the series, we went over some basic jQuery syntax and concepts- however, now that you’ve got your bearings, I’m sure you’re ready to...
  • Functionality of the file reading commands

    While learning the how to navigate through directories and systems through terminals and command lines,one thing is certain, your ability to located  exactly your looking for is essential. As we...
  • Intro to JQuery, Part I

    Introduction Before we begin, it’s important to note that this article assumes basic knowledge of HTML, CSS, and Javascript. If you haven’t already, it may be beneficial to review some...
  • SSL Certificate Installation for Courier IMAP and POP

    This guide will provide you information on how to setup and configure SSL certificates for the courier IMAP mail server.   Prior to the installation you will need to purchase...