Re: /usr/bin/ld: cannot find -lmysqlclient | error: wrong mysql library version or lib not found
| From: | Guillermo Cespedes | Date: | Tue, 04 Jul 2017 19:07:10 +0000 |
| Subject: | Re: /usr/bin/ld: cannot find -lmysqlclient | error: wrong mysql library version or lib not found | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99746@lists.php.net to get a copy of this message | ||
Hi, Johannes
- I have cleaned the build directory.
- "source /etc/profile" globally
- set the values with "shared, mysqlnd�
With the last 3 changes, I have managed to compile PHP.
See diff: https://gist.github.com/dertin/8de14e458dd4f0d3acb5f0deff120951/revisions?diff=split
<https://gist.github.com/dertin/8de14e458dd4f0d3acb5f0deff120951/revisions?diff=split>
I'll try without the shared library.
I do not understand much that it is better, to use or not to use shared libraries
mysqlnd VS shared,mysqlnd
I will continue to fix and improve the script.
# /usr/local/php7/bin/php -v
PHP 7.1.6 (cli) (built: Jul 4 2017 18:43:51) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
# /usr/local/php7/bin/php -i | grep Configure
Configure Command => './configure' '--prefix=/usr/local/php7'
'--enable-huge-code-pages'
'--with-config-file-scan-dir=/usr/local/php7/etc/conf.d' '--without-pear'
'--enable-bcmath' '--with-bz2' '--enable-calendar'
'--enable-intl' '--enable-exif' '--enable-dba'
'--enable-ftp' '--with-gettext' '--with-gd'
'--with-jpeg-dir' '--enable-mbstring' '--with-mcrypt'
'--with-mhash' '--enable-mysqlnd=shared'
'--with-mysqli=shared,mysqlnd' '--with-pdo-mysql=shared,mysqlnd'
'--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-openssl'
'--enable-pcntl' '--with-pspell' '--enable-shmop'
'--enable-soap' '--enable-sockets' '--enable-sysvmsg'
'--enable-sysvsem' '--enable-sysvshm' '--enable-wddx'
'--with-zlib' '--enable-zip' '--with-readline' '--with-curl'
'--enable-simplexml' '--enable-xmlreader' '--enable-xmlwriter'
'--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data’
Thanks for the help.
> El 4 jul. 2017, a las 14:09, Johannes Schlüter <johannes@php.net> escribió:
>
> On Di, 2017-07-04 at 13:39 -0300, Guillermo Cespedes wrote:
>> See in: å
>> Š|\AS{Ycö¸ÿUhttps://lists.launchpad.net/maria-discuss/msg04668.html
>
> Thanks, the --version output is of course unfortunate, as I can't
> distinguish in a good way between MariaDB and a future MySQL 10, except
> by guessing from program name ... anyways I'll see what I can do.
>
>> 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
>
> Works nicely for my:system, which doesn't have mysql_config in PATH:
>
> $ mysql_config
> The program 'mysql_config' is currently not installed. You can install
> it by typing:
> sudo apt install libmysqlclient-dev
>
>
>
> $ sapi/cli/php -v
> PHP 7.1.8-dev (cli) (built: Jul 4 2017 19:05:05) ( NTS )
> Copyright (c) 1997-2017 The PHP Group
> Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
>
> $ sapi/cli/php -i | grep Configure
> Configure Command => '../../php-7.1/configure' '--enable-mysqlnd'
> '
> --with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql-
> sock=/var/run/mysqld/mysqld.sock'
>
> Maybe you have old autoconf cache files lying around or such? Can you
> try on a clean tree? If this doesn't help please provide the config.log
> file.
>
> johannes
>