≡ Menu

Freebsd: /libexec/ld-elf.so.1: Shared object "libc.so.6" not found Error and Solution

Q. When I type portmanager I get an error that read as follows:
freebsd /libexec/ld-elf.so.1: Shared object "libc.so.6" not found

How do I fix this error?

A. To fix this error you need to install port - /usr/ports/misc/compat6x. This package allows you to install the compat6x libraries on your system, so you can use legacy binaries that depend on them. Type the following command at a shell prompt:
# cd /usr/ports/misc/compat6x
# make install clean

Now you should able to use portmanager command.

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 2 comments… add one }

  • Mel July 1, 2008, 3:51 pm

    This is actually bad advice.
    Here’s the reasons I’ll say that:
    1) It will mask the actual problem, which is that the software has not been recompiled since the OS had a major version upgrade.
    2) If your system upgrade only worked partially, then now also the old system binaries will work again, as libc.so.6 can be found. Again, masking the real problem.

    3) The proper way to address the problem, is to rebuild the port manager software you’re using and then rebuild all your ports. An article like this would the ideal opportunity to show how that is done.
    4) You also then have the opportunity to explain what compat6x really is for: 3rd party binaries that are not (yet) available for 7.x and the ports system pulls in compat6x by itself where required.

  • Evan May 25, 2009, 4:51 pm

    It is true that this just masks the real problem, but if you need to get everything on server running again after you messed during an upgrade or something then this really helps. I messed up during an upgrade from Freebsd 6.3 to 7.0 and got an error about a missing binary when i tried running any installed package. After i installed these legacy binaries everything worked again and was a good temporary fix until i could run portupgrade again.

Leave a Comment