安裝 PHP 時出現error: Cannot find MySQL header files under yes的錯誤訊息

[服務架設][系統]安裝 PHP 時出現error: Cannot find MySQL header files under yes的錯誤訊息

安裝 PHP 時,剛執行 ./configure –with-apxs2=/usr/local/Apache2/bin/apxs –with-mysql
就出現以下錯誤訊息:

…..
checking for mSQL support… no
checking for MSSQL support via FreeTDS… no
checking for MySQL support… yes
checking for specified location of the MySQL UNIX socket… no
checking for MySQL UNIX socket location… /tmp/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore.

解法:

o 如果不知道 header file 在哪,用 「find / -name mysql.h」命令找出其位置;
o 如果是自己也有手動安裝 MySQL 套件的話,直接指定該位置。

在 ./configure 下參數指定 header file 的位置,如下:

./configure –with-apxs2=/usr/local/Apache2/bin/apxs –with-mysql=/usr/local/mysql –with-mysqli=/usr/local/mysql/bin/mysql_config

這篇文章的關鍵字:
PHP install (PHP安裝), MySQL header files

[LINUX]安裝 PHP 時出現undefined reference to `libiconv_open’ 之類的錯誤訊息

[服務架設][系統][LINUX]安裝 PHP 時出現undefined reference to `libiconv_open’ 之類的錯誤訊息

安裝環境: Linux Fedora Core 3 上安裝 php-5.2.0

在安裝 PHP 到系統中時要是發生「undefined reference to `libiconv_open’」之類的錯誤訊息,那表示在「./configure 」沒抓好一些環境變數值。錯誤發生點在建立「-o sapi/cli/php」時出錯,沒給到要 link 的 iconv 函式庫參數。

快速的解法是: Continue reading “[LINUX]安裝 PHP 時出現undefined reference to `libiconv_open’ 之類的錯誤訊息”