TA的每日心情 | 开心 2016-9-12 14:18 |
---|
签到天数: 11 天 连续签到: 1 天 [LV.3]测试连长
|
今天安装pdo_mysql步骤如下:
1.下载源文件
PDO_MYSQL-1.0.2.tgz
2.解压文件
tar zxvf PDO_MYSQL-1.0.2.tgz
3.进入目录
cd PDO_MYSQL-1.0.2
4.安装phpize
apt-get install php5-dev
5.使用phpize命令
~/下载/PDO_MYSQL-1.0.2$ /usr/bin/phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
6.输入命令 ./configure
出现如下:
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for MySQL support for PDO... yes, shared
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under
7.网上找资料 输入命令 sudo ln -s /usr/share/mysql/mysql_config /usr/bin/mysql_config
8.最后输入命令./configure --with-php-config=/usr/bin/php-config --with-pdo-mysql=/usr/bin/mysql
出现如下:
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for MySQL support for PDO... yes, shared
checking for mysql_config... /usr/bin/mysql
/usr/bin/mysql: unknown option '--cflags'
/usr/bin/mysql: unknown option '--libs'
/usr/bin/mysql: option '--socket' requires an argument
checking for mysql_query in -lmysqlclient... no
configure: error: mysql_query missing!?
然后网上就找不到解决办法了 ,请各位大侠帮我解决问题,感激不尽啊
系统是CentOS6.5
php安装目录在 /usr/local/php
mysql安装目录在 /usr/share/mysql |
|