<Checking for mysql_config not found>, mysqlnotfound
Php 5.3.29 compilation and 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:
I have found many methods, but I have not solved them:
1. This is very close, but it is not clear, it is still confusing.
This is because the '-- with-pdo-mysql' option is specified during compilation, but it does not find the mysql installation directory, therefore, you can simply specify the mysql installation directory '-- with-pdo-mysql =/usr/local/mysql'
2. This is totally irrelevant and incorrect.
1) sudo ln-s/usr/local/mysql/bin/mysql_config/usr/local/bin/mysql_config
Link mysql_confi from your installation directory to the/usr/local/bin directory, so that you can access it in any directory (or put it in/usr/bin)
2) edit the site of the source code folder. cfg file, remove the comment # Before mysql_config =/usr/local/bin/mysql_config #, and modify the following path to the actual directory of mysql_config. (If you do not know where mysql_config is, run the command whereis mysql_config)
3. the same idea as the second one is also wrong.
Run
ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config
Link mysql_config/usr/local/bin
Directory
4. I think it is possible.
Yum install mysl mysql-devel
5. One article said that the blogs of the backend are all wrong. installing these two packages can solve the problem. He tried it himself 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 is my simplest and most effective method:
. /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 message is that mysql cannot find the plug-in according to the specified path when installing the plug-in. Why are we going to intervene? It's not enough to leave it empty and search for it.