Home  >  Article  >  Database  >  PDO_MYSQL make: *** [pdo_mysql.lo] Error 1

PDO_MYSQL make: *** [pdo_mysql.lo] Error 1

WBOY
WBOYOriginal
2016-06-07 17:52:391969browse

今天在linux中安装pdo_mysql时出现PDO_MYSQL make: *** [pdo_mysql.lo] Error 1错误,下面来看解决方法。

因为在编译时需要 MySQL 的头的文件。而它按默认搜索找不到头文件的位置,所以才出现这个问题。通过软连接把MySQL头文件对应到/usr/local/include/下就好

比如你的MySQL安装文件位于/usr/local/mysql,那么就执行以下命令:

# ln -s /usr/local/mysql/include/* /usr/local/include/

解决方法:

 代码如下 复制代码

将 /usr/local/server/mysql/include/ 目录下的 MySQL 头文件链接到 /usr/local/include/ 的目录下。
# ln -s /usr/local/server/mysql/include/* /usr/local/include/

重启apache,到此安装完成,可以查看phpinfo.php里找到对应的pdo_mysql。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn