单独安装PHP 或PDO_MYSQL时可能遇到的问题:
configure: error: Unable to find your mysql installation
checking for mysql_config... not found
checking for mysql install under /usr/share/mysql... can not find it
configure: error: Unable to find your mysql installation
./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql-dir=/usr/share/mysql --with-iconv-dir=/usr/local --with-freetype-dir --with-mysqli-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap –with-pdo-mysql=/usr/lib/mysql –enable-mbstring
因为我写的mysql位置的路径发生错误,和实际工作路径不符.
# which mysql
/usr/bin/mysql
mysql的路径与实际工作路径替换/usr/bin/mysql.
OK,问题解决!