Re: /usr/bin/ld: cannot find -lmysqlclient | error: wrong mysql library version or lib not found
| From: | Guillermo Cespedes | Date: | Tue, 04 Jul 2017 16:39:48 +0000 |
| Subject: | Re: /usr/bin/ld: cannot find -lmysqlclient | error: wrong mysql library version or lib not found | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99741@lists.php.net to get a copy of this message | ||
Hi, Thanks for the reply
# /usr/local/mysql/bin/mariadb_config
# /usr/local/mysql/bin/mysql_config
# my_print_defaults --mysqld
See in: https://lists.launchpad.net/maria-discuss/msg04668.html
<https://lists.launchpad.net/maria-discuss/msg04668.html>
I also tried the following:
--enable-mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/run/mysqld/mysqld.sock
It returns an error that can not find mysql_config
In an hour I'll try:
--enable-mysqlnd=shared \
--with-mysqli=shared,mysqlnd \
--with-pdo-mysql=shared,mysqlnd \
--with-mysql-sock=/var/run/mysqld/mysqld.sock
As indicated here: https://lists.launchpad.net/maria-discuss/msg04674.html
<https://lists.launchpad.net/maria-discuss/msg04674.html>
Regards,
> El 4 jul. 2017, a las 13:10, Johannes Schlüter <johannes@php.net> escribió:
>
> Hi,
>
> On Mo, 2017-07-03 at 19:17 -0300, Guillermo Cespedes wrote:
>> Hi,
>>
>> I am compiling MariaDB 10.2.6 and PHP 7.1.6
>>
>> I'm trying it on Debian 8.8 32x / x64 on DigitalOcean
>>
>> See the script:
>>
>> https://gist.github.com/dertin/8de14e458dd4f0d3acb5f0deff120951
>>
>> But I have problems compiling PHP with MariaDB
>>
>> # grep 'mysql’ config.log
>
> [...]
>
>> configure:52749: checking for mysql_set_server_option in
>> -lmysqlclient
>
> The cause for the behavior seems to be that the mysqli/config.m4 file
> checks your the information provided by the "config" program you
> passed, but for feature check uses the hard coded name of libmysql.
> Maybe this could be refactored to a simpler version check and
> discontinue support for versions before 5.0 ... if you send me the
> output from
> mariadb_config --libs
> and
> mariadb_config --version
> I can see if I can cook up a patch.
>
>
> That said: Preferred way is to build using mysqlnd instead of libmysql,
> so just use --with-mysql and --with-pdo-mysql without path (or, in
> case you like it explicit, =mysqlnd for both) that's the client library
> optimized for PHP.
> See http://php.net/manual/en/mysqlinfo.library.choosing.php
>
>
> Also mind that MariaDB is a downstream fork of MySQL and both systems
> are diverting and likely will divert more over time. Experience can
> vary.
>
> johannes
>
> Note: I'm a member of Oracle's MySQL engineering team. Personal
> opinions. No promises from Oracle.