FreeBSD: ldconfig -v Lost Dynamic Linker Configuration

If the ldconfig command on FreeBSD reports a “Lost Dynamic Linker Configuration” error message, it means that the system’s dynamic linker configuration is broken or missing. This can be caused by a number of factors, such as incorrect permissions or a corrupted file system.

To fix this error, you can follow these steps:

  1. Check if the /var/run/ld-elf.so.hints file exists:
    ls -l /var/run/ld-elf.so.hints

    If the file does not exist, you can create it by running the following command:

    touch /var/run/ld-elf.so.hints
  2. Make sure the file has the correct permissions:
    chmod 644 /var/run/ld-elf.so.hints
  3. Rebuild the system’s dynamic linker configuration by running ldconfig with the -v option:
    ldconfig -v

    This will rebuild the system’s dynamic linker cache and update the /var/run/ld-elf.so.hints file.

  4. Verify that the error message is no longer displayed:
    ldconfig -r | grep lost

    This command should not return any results, indicating that the “Lost Dynamic Linker Configuration” error has been fixed.

Note that if the error persists, it may be a sign of a more serious problem with the system’s file system or hardware. In that case, it is recommended to investigate the issue further or seek assistance from a system administrator.

Leave a Comment