一、PHP configure: error: Cannot find ldap libraries in /usr/lib
今天在CentOS 64位下編譯安裝PHP5.4.8。結果在configure的時候提示
configure: error: Cannot find ldap libraries in /usr/lib
提示在/usr/lib 下找不到相關模塊,這是因為64位的linux默認把以上文件都存在 /usr/lib64 文件夾下。
解決方法:
復制代碼 代碼如下:
cp -frp /usr/lib64/libldap* /usr/lib/
重新configure即可
二、PDO_MYSQL make: *** [pdo_mysql.lo] Error 1
編譯安裝PDO_MYSQL拓展模塊,總是提示:
復制代碼 代碼如下:
In file included from /data0/software/PDO_MYSQL-1.0.2/pdo_mysql.c:31:
/data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:25:19: error: mysql.h: No such file or directory
In file included from /data0/software/PDO_MYSQL-1.0.2/pdo_mysql.c:31:
/data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:36: error: expected specifier-qualifier-list before ‘MYSQL'
/data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:48: error: expected specifier-qualifier-list before ‘MYSQL_FIELD'
/data0/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:53: error: expected specifier-qualifier-list before ‘MYSQL_RES'
make: *** [pdo_mysql.lo] Error 1
這是因為這是因為在編譯時需要 MySQL 的頭的文件。而它按默認搜索找不到頭文件的位置,所以才出現這個問題。通過軟連接把MySQL頭文件對應到/usr/local/include/下就好
比如你的MySQL安裝文件位於/usr/local/mysql,那麼就執行以下命令:
復制代碼 代碼如下:
# ln -s /usr/local/mysql/include/* /usr/local/include/