Error: shared library "mysqlclient.18" does not exist

Matthew Seaman matthew at
Mon Mar 11 18:54:47 UTC 2013

On 11/03/2013 16:59, Jeff Tipton wrote:
> I'm trying to set up security/maia, and this is the error message I get:
> Error: shared library "mysqlclient.18" does not exist
> Of course, the library does exist :(
> # ls /usr/local/lib/mysql/
> libmysqlclient.a       libmysqlclient_r.a     libmysqld.a
>    libmysqlservices.a
> plugin
> I googled about this, and I found 3 things to try but none of that was
> helpful here:

One other thing to try: examine the output of 'ldconfig -r' -- you
should see -libmysqlclient.18 somewhere in the listing.

The default location the ports will install that library is


which, you'll notice is in a subdirectory of /usr/local/lib -- not on
the default shared library search path.  If it's been correctly
installed however you should see /usr/local/lib/mysql amongst the search
directories around the 2nd line of the ldconfig -r output.

If not, you can run this:

  ldconfig -m /usr/local/lib/mysql

You only need to do that once, and the system should remember it.
Installing from the port or packages (old or pkgng style) should do that
automatically.  How did you install mysql-client?



Dr Matthew J Seaman MA, D.Phil.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-questions mailing list