mysqlのrpmソース入手先
ftp://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-4.1/
phpのコンパイル
php4.4.6→php-5.2.1にアップしてやってみる。
configureオプションは
./configure --with-apxs2=/opt/apache2/bin/apxs --enable-mbstring --enable-zend-multibyte --enable-sqlite-utf8 --enable-memory-limit --with-mysql
【PHP 5.2.4(失敗)】
最初PHP 5.2.4でやろうとしたが、
このバージョンでコンパイルすると
以下の順に躓く
■configure: error: xml2-config not found. Please check your libxml2 installation.
これは
yumでlibxml2-develを入れたら解決。
■configure: error: Cannot find libmysqlclient_r under /usr.
Note that the MySQL client library is not bundled anymore!
libmysqlclientが/usr下にないというエラーで躓く。
実際はlib64の下とかにlibmysqlclient.soはあるんだがだめ。
LD_LIBRARY_PATHにパスを通してみたりしてもだめ。
http://blog.openmedialabo.net/?p=132
を見ると、PHP 5.2.4ではMysqlコンパイル時に
./configure --enable-thread-safe-client --with-charset=binary
をつけないとダメらしい。
今回はそもそもMysqlをyumから入れてるため、PHPのバージョンを変える事に。
【php-5.2.1】
上記の同じconfigureオプションで実行したところ、
checking lex output file root... ./configure: line 3375: lex: command not found
configure: error: cannot find output from lex; giving up
というエラー。調べると、
http://www.databasebank.com/programmers/frm_detail.php?v_id=1992
にあるように
「PHPのコンパイルにはflexとbisonの両方が必要」らしい。
とりあえずflexを入れる。
yum install flex.x86_64
configure: error: Cannot find libmysqlclient_r under /usr.
Note that the MySQL client library is not bundled anymore!
この問題は/usr/libにmysqlのLIBRARYが見つからない為。
yumで入れたmysqlのLIBRARYの場所を教えてやる。
cd /usr/lib/
ln -s /usr/lib64/mysql mysql
これでconfigureが通るようになる。
後はmake ~ make install
http://kapi.jp/kapi_blog/59
2007年09月06日
関連カテゴリ PHP