Hi Johnny, all!
Johnny Stork wrote:
> Typo, moved from 5.0.67 to 5.1.34
Ok, that helps - I checked the contents.
>
> Johnny Stork wrote:
>> I recently upgraded an asterisk/trixbox server to mysql 5.1.34 from
>> 5.64. Access to the db seesm fine from the shell, phpmyadmin or even
>> the Trixbox/FreePBX tool, but trying to apply Trixbox changes, or
>> running a "pear update" produces the errors below. I created a couple
>> of sl but this did not seem to fix the problem. Below is the error and
>> contents of /usr/lib
Somewhere during this upgrade you seem to have lost the shared libraries
of the MySQL client side which you had with version 5.0.67:
/usr/lib/libmysqlclient_r.so.15.0.0
/usr/lib/libmysqlclient.so.15.0.0
MySQL 5.0 comes with version 15 of these libraries,
MySQL 5.1 comes with version 16.
How these are handled depends on how you install MySQL (assuming Linux):
a) If you use "tar.gz" packages, then MySQL 5.0 has brought version 15
and created symlinks from the unversioned name to the versioned:
/usr/lib/libmysqlclient.so -> /usr/lib/libmysqlclient.so.15
/usr/lib/libmysqlclient.so.15 -> /usr/lib/libmysqlclient.so.15.0.0
/usr/lib/libmysqlclient.so.15.0.0 would be a real file.
(Similar for "libmysqlclient_r.so")
Then, upgrading to 5.1 would bring version 16:
/usr/lib/libmysqlclient.so -> /usr/lib/libmysqlclient.so.16
/usr/lib/libmysqlclient.so.16 -> /usr/lib/libmysqlclient.so.16.0.0
Again, /usr/lib/libmysqlclient.so.16.0.0 would be a real file.
Note that this installation changes the symlimk for the unversioned
name, but would not touch version 15, there still is
/usr/lib/libmysqlclient.so.15 -> /usr/lib/libmysqlclient.so.15.0.0
/usr/lib/libmysqlclient.so.15.0.0 would still exist as a real file.
b) If you use RPMs, then installing MySQL 5.0 has set up version 15 of
the client libraries in the same way.
However, the upgrade to MySQL 5.1 would have removed the files
brought by 5.0 and just installed the new version 16
(specifically, the 5.1 "shared" RPM does this).
If you use applications that were built against older versions of the
MySQL client libraries (like "Trixbox"), you must not lose these
older files.
For this purpose, we provide "shared-compat" RPMs, they contain the
current and all previous versions of the client libraries.
See this contents listing:
>prompt> rpm -qlvp MySQL-shared-compat-5.1.34-0.glibc23.i386.rpm | cut
>-c1-11,37-
> lrwxrwxrwx 24 Apr 5 23:56 /usr/lib/libmysqlclient.so ->
> libmysqlclient.so.16.0.0
> lrwxrwxrwx 24 Apr 5 23:56 /usr/lib/libmysqlclient.so.10 ->
> libmysqlclient.so.10.0.0
> -rwxr-xr-x 224606 Apr 5 23:56 /usr/lib/libmysqlclient.so.10.0.0
> lrwxrwxrwx 24 Apr 5 23:56 /usr/lib/libmysqlclient.so.12 ->
> libmysqlclient.so.12.0.0
> -rwxr-xr-x 221492 Apr 5 23:56 /usr/lib/libmysqlclient.so.12.0.0
> lrwxrwxrwx 24 Apr 5 23:56 /usr/lib/libmysqlclient.so.14 ->
> libmysqlclient.so.14.0.0
> -rwxr-xr-x 1267848 Apr 5 23:56 /usr/lib/libmysqlclient.so.14.0.0
> lrwxrwxrwx 24 Apr 5 23:56 /usr/lib/libmysqlclient.so.15 ->
> libmysqlclient.so.15.0.0
> -rwxr-xr-x 1942232 Apr 5 23:56 /usr/lib/libmysqlclient.so.15.0.0
> lrwxrwxrwx 24 Apr 5 23:56 /usr/lib/libmysqlclient.so.16 ->
> libmysqlclient.so.16.0.0
> -rwxr-xr-x 1989112 Apr 5 23:56 /usr/lib/libmysqlclient.so.16.0.0
> lrwxrwxrwx 26 Apr 5 23:56 /usr/lib/libmysqlclient_r.so ->
> libmysqlclient_r.so.16.0.0
> lrwxrwxrwx 26 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.10 ->
> libmysqlclient_r.so.10.0.0
> -rwxr-xr-x 230560 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.10.0.0
> lrwxrwxrwx 26 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.12 ->
> libmysqlclient_r.so.12.0.0
> -rwxr-xr-x 225752 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.12.0.0
> lrwxrwxrwx 26 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.14 ->
> libmysqlclient_r.so.14.0.0
> -rwxr-xr-x 1274796 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.14.0.0
> lrwxrwxrwx 26 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.15 ->
> libmysqlclient_r.so.15.0.0
> -rwxr-xr-x 1950652 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.15.0.0
> lrwxrwxrwx 26 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.16 ->
> libmysqlclient_r.so.16.0.0
> -rwxr-xr-x 1999100 Apr 5 23:56 /usr/lib/libmysqlclient_r.so.16.0.0
> lrwxrwxrwx 21 Apr 5 23:56 /usr/lib/libndbclient.so ->
> libndbclient.so.2.0.0
> lrwxrwxrwx 21 Apr 5 23:56 /usr/lib/libndbclient.so.2 ->
> libndbclient.so.2.0.0
> -rwxr-xr-x 759988 Apr 5 23:56 /usr/lib/libndbclient.so.2.0.0
For comparison, this is the 5.1.34 "shared" RPM:
>> rpm -qlvp MySQL-shared-5.1.34-0.glibc23.i386.rpm | cut -c1-11,37-
> lrwxrwxrwx 24 Mar 31 22:47 /usr/lib/libmysqlclient.so ->
> libmysqlclient.so.16.0.0
> lrwxrwxrwx 24 Mar 31 22:47 /usr/lib/libmysqlclient.so.16 ->
> libmysqlclient.so.16.0.0
> -rwxr-xr-x 1998728 Mar 31 22:48 /usr/lib/libmysqlclient.so.16.0.0
> lrwxrwxrwx 26 Mar 31 22:47 /usr/lib/libmysqlclient_r.so ->
> libmysqlclient_r.so.16.0.0
> lrwxrwxrwx 26 Mar 31 22:47 /usr/lib/libmysqlclient_r.so.16 ->
> libmysqlclient_r.so.16.0.0
> -rwxr-xr-x 2008716 Mar 31 22:48 /usr/lib/libmysqlclient_r.so.16.0.0
Ok, so much for the background. Now how do you fix it?
This should be simple: You need version 15 of the client libraries as
"real" files, but the default (unnamed) must still be a symlink to
version 16 (as shown in the above list).
You have two possibilities:
a) If you are using tar.gz (or if you are using RPMs and don't want to
uninstall "shared", see below), just remove the wrong symlinks (all
about version 15) and manually install the real files,
"/usr/lib/libmysqlclient.so.15.0.0" (and "libmysqlclient_r").
Then, install the symlinks:
/usr/lib/libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
(again, similar for "libmysqlclient_r").
You get them from your backup (you have one, I trust?).
If you don't have them, just download a 5.0.67 tar.gz package for
your platform, and extract only these files.
On Linux, you can also download a 5.0.67 "shared" or "shared-compat"
RPM, or a 5.1.34 "shared-compat" one, and use "rpm2cpio" to extract
these files.
b) If you are using RPMs, you may uninstall the 5.1.34 "shared" RPM and
then install the 5.1.34 "shared-compat" (for your platform).
Uninstalling "shared" may complain about breaking dependencies -
don't worry, "shared-compat" will fix this.
So you can forcefully uninstall "shared" and immediately install
"shared-compat", the worst that will happen is that a MySQL client
started in this tiny gap will not come up.
However, I cannot guarantee that installing "shared-compat" will not
complain about the existing symlinks of version 15, you may need to
remove them manually.
HTH,
Jörg
--
Joerg Bruehe, MySQL Build Team, [email protected]
Sun Microsystems GmbH, Komturstraße 18a, D-12099 Berlin
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering Muenchen: HRB161028
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[email protected]