Mac 上的 PDO MySQL 驱动程序
我有一台大约一年前安装的自定义 PHP 5 的 Mac。 我记得我花了整个星期天的时间,编译了大约 20 次才能把它做好。 我拥有的 MySQL 来自熵并且是预编译的。
现在我需要让 PDO 与 MySQL 驱动程序一起工作,但驱动程序尚未安装。 我尝试了“pecl install pdo_mysql”,但它在找不到某些 mysql 文件时死掉了。 有什么想法可以快速解决这个问题吗?
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under
ERROR: `/private/tmp/pear/temp/PDO_MYSQL/configure' failed
我将发布您需要的任何路径或消息来帮助我解决此问题。 我是否必须重新编译 PHP,或者我可以只编译 pdo_mysql 扩展吗?
我希望我看起来并不懒惰,我只是有很多代码要写,而没有太多时间来处理我的 PHP 配置。
I have a mac with a custom PHP 5 install that built from about a year ago. I remember it took all Sunday and I had to compile about 20 times to get it right. The MySQL I have is from entropy and was precompiled.
Now I need to get PDO with the MySQL driver working and the driver is not installed. I tried the "pecl install pdo_mysql" and it dies at a point where it can't find some mysql files. Any ideas how I can fix this quickly?
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under
ERROR: `/private/tmp/pear/temp/PDO_MYSQL/configure' failed
I'll post whatever paths or messages you need to help me troubleshoot this. Will I have to compile PHP all over again, or can I just compile the pdo_mysql extension?
I hope I don't seem lazy, I just have a lot of code to write and not a lot of time to fight with my PHP configuration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您将需要手动编译它,而不是通过 PECL。 您需要知道 MySQL 安装在哪里。 我不知道 Entropy 包,但 MySQL 提供的构建(我推荐)安装到
/usr/local/mysql
中。这应该会让您能够配置它。
You're going to need to compile it by hand, instead of via PECL. You'll need to know where your MySQL install is. I don’t know about the Entropy packages, but the builds provided by MySQL (which I recommend) install into
/usr/local/mysql
.And that should get you to the point where you can configure it.
供参考; MySQL PDO 驱动程序包含在 Marc Liyanage 的 entropy.ch 的 php 5.2.9 和 5.3 版本中
FYI; the MySQL PDO driver is included in the php 5.2.9 and 5.3 builds from Marc Liyanage's entropy.ch