PHP 5.3.29 compiler Installation Troubleshooting:
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/mysql-- With-mysqli=/usr/bin/mysql_config--with-pdo-mysql=/usr/loca/mysql--with-gd--with-png-dir=/usr/local/libpng-- With-jpeg-dir=/usr/local/jpeg--with-freetype-dir=/usr/local/freetype--with-vpx-dir=/usr/local/libvpx/-- With-zlib-dir=/usr/local/zlib--with-t1lib=/usr/local/t1lib--with-iconv--enable-libxml--enable-xml-- Enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--enable-opcache--enable-mbregex-- ENABLE-FPM--enable-mbstring--enable-ftp--enable-gd-native-ttf--with-openssl--enable-pcntl--enable-sockets-- With-xmlrpc--enable-zip--enable-soap--without-pear--with-gettext--enable-session--with-curl--enable-ctype
Error:
- Checking for mysql_config. . Not found
- Configure: error: unable to find your MySQL installation
I looked for a lot of ways, but it didn't work out:
1, this is very close, but not clear, or let the human circle.
This is because the '--with-pdo-mysql ' option was specified at compile time, but it did not find the installation directory of MySQL, so only the installation directory of the specified MySQL can be '--with-pdo-mysql=/usr/local/mysql '
2. This is completely non-detached, wrong.
1) sudo Ln-s/usr/local/mysql/bin/mysql_config/usr/local/bin/mysql_config
Links mysql_confi from your installation directory to the/usr/local/bin directory, This can be accessed in any directory (also can be placed in/usr/bin)
2) Edit the source folder site.cfg file, remove #mysql_config =/usr/local /bin/mysql_config before the comment #, modify the following path for your mysql_config real directory on it. (If you don't know where Mysql_config is, run the command: Whereis mysql_config)
3, and the second kind of idea, is also wrong.
Perform
ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config
Link the mysql_config to /usr/local/bin
the directory
4, I feel a bit possible.
Yum Install MYSL Mysql-devel
5, there is an article said backside blog write is wrong, install the 2 package can be resolved, he tried, but did not solve my problem.
mysql-shared-compat-5.5.40-1.el6.x86_64.rpm
mysql-shared-5.5.40-1.el6.x86_64.rpm
Mysql-embedded-devel-5.1.73-3.el6_5.x86_64
Here's my simplest, direct and effective approach:
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/mysql- -with-mysqli=/usr/bin/mysql_config--with-pdo-mysql--with-gd--with-png-dir=/usr/local/libpng--with-jpeg-dir=/usr/local/jpeg--with-freetype-dir=/usr/local/ FreeType--with-vpx-dir=/usr/local/libvpx/--with-zlib-dir=/usr/local/zlib--with-t1lib=/usr/local/t1lib-- With-iconv--enable-libxml--enable-xml--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization --enable-opcache--enable-mbregex--enable-fpm--enable-mbstring--enable-ftp--enable-gd-native-ttf--with-openssl- -enable-pcntl--enable-sockets--with-xmlrpc--enable-zip--enable-soap--without-pear--with-gettext-- Enable-session--with-curl--enable-ctype
The error is because MySQL installed this plug-in, according to the specified path is not found. Why do we have to intervene, directly to the empty, let its own search to find, so not good.
<checking for Mysql_config not found>