ubuntu 系统下安装pdo_mysql出错

明禾 2014-01-05 07:27:43

lamp环境搭建采用 apt-get命令,pdo_mysql采用源码包单独安装
今天安装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!?

然后网上就找不到解决办法了 ,请各位大侠帮我解决问题,感激不尽啊

系统是 ubuntu 13.10
php安装目录在 /usr/share/php
mysql安装目录在 /usr/share/mysql

...全文
377 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
明禾 2014-01-07
  • 打赏
  • 举报
回复
按照网上的方法,虽然没有安装成功,但我用phpinfo查看时, 惊奇的发现里面居然已经有pdo_mysql 了。
嘻哈大咖秀 2014-01-06
  • 打赏
  • 举报
回复
http://hi.baidu.com/171172/item/2ff0310da3e0ece2f45ba601 你可以参考下这个希望对你有帮助
明禾 2014-01-05
  • 打赏
  • 举报
回复
没有人回答吗?

20,359

社区成员

发帖
与我相关
我的任务
社区描述
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
phpphpstorm 技术论坛(原bbs)
社区管理员
  • 开源资源社区
  • phpstory
  • xuzuning
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧