Date: Thu, 06 Sep 2007 07:31:45 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Zbigniew Szalbot <zszalbot@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Unable to load dynamic library / mysql.so Message-ID: <46DF9ED1.3090801@infracaninophile.co.uk> In-Reply-To: <94136a2c0709052318k5c5863d2qdd2a1e9568e77261@mail.gmail.com> References: <94136a2c0709052240t708b91d2kdeff3acffb96b39b@mail.gmail.com> <46DF9A00.5070603@infracaninophile.co.uk> <94136a2c0709052318k5c5863d2qdd2a1e9568e77261@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Zbigniew Szalbot wrote:
> Hello,
>
> 2007/9/6, Matthew Seaman <m.seaman@infracaninophile.co.uk>:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Zbigniew Szalbot wrote:
>>> Hello,
>>>
>>> I got a php warning and I am not sure what would be the best way to
>>> deal with it. I'd like to be able to load the dynamic extension as
>>> without it database back-end sites won't work. Will it help to force
>>> upgrade of php4 and php4-extensions (portupgrade -f)?
>>>
>>> php -v
>>> PHP Warning: Unknown(): Unable to load dynamic library
>>> '/usr/local/lib/php/20020429/mysql.so' - Shared object
>>> "libmysqlclient.so.15" not found, required by
>>> "mysql.so" in Unknown on line 0
>>> PHP 4.4.7 (cli) (built: Jul 28 2007 17:27:57)
>>> Copyright (c) 1997-2007 The PHP Group
>>> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>>>
>>> mysql --version
>>> mysql Ver 14.14 Distrib 5.1.21-beta, for portbld-freebsd6.2 (i386) using 5.0
>>>
>>> Many thanks for your suggestions!
>> What does:
>>
>> ldconfig -r | grep mysql
>
> ldconfig -r | grep mysql
> search directories:
> /lib:/usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/compat/pkg:/usr/local/lib/mysql:/usr/local/lib/dovecot:/usr/local/lib/dovecot/imap:/usr/local/lib/dovecot/pop3:/usr/local/lib/dovecot/lda:/usr/local/lib/pth:/usr/local/lib/apache2
> 134:-lmysql_drv.7 => /usr/local/lib/libmysql_drv.so.7
> 206:-lmysqlclient.16 => /usr/local/lib/mysql/libmysqlclient.so.16
> 207:-lmysqlclient_r.16 => /usr/local/lib/mysql/libmysqlclient_r.so.16
>
> I did notice yesterday that the system now (after mysql upgrade) wants
> to use mysqlclient.so.16 (it was dovecot who first complained, its
> upgrade solved the problem). So maybe I should refresh the php
> installation to take notice of that?
>
Seems you've actually installed mysql-client-5.1.x rather than the
mysql-client-5.0.x PHP is looking for.
Recompiling PHP will make it link against the later shlib. In fact,
you should run this:
portupgrade -fr mysql-client
(or the equivalent in whatever ports management package you prefer)
Thus will force a recompile of everything that depends on
mysql-client, so that they all pick up the change in shlib version
number.
Hmmm... I guess you aren't a portupgrade(1) user, because if you
were, there would still be a copy of libmysqlclient.so.15 preserved
in /usr/local/lib/compat/pkg/ and the mysql dependent applications
would still be running against that. Although you should still do
the forced upgrade shown above: portupgrade's behaviour of saving
old shared libraries is meant to provide a temporary band-aid
towards keeping everything running as far as possible while
performing system updates.
Cheers,
Matthew
- --
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG357R8Mjk52CukIwRCNQAAJ4mADS9Gybg3JWdSuJb3HaFtHWFmgCfULYP
yqdlLbLT3QiSLdSyYnuo6fk=
=kM/F
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46DF9ED1.3090801>
