プロが教える店舗&オフィスのセキュリティ対策術

お世話になっております。fedora 14、php 5.3.6-1.fc14、ibm db2 express c 9.7.4 linux x86で
PDOを使ってDB2に接続するため、ドライバをインストールしようとしているのですが、方法がわかりません。

https://students.kiv.zcu.cz/doc/php5/manual/ja/r …
http://www.php.net/manual/ja/install.pecl.phpize …

を参考に以下のようにターミナルで実行したのですが、

[root@FLORA-FEDORA ibm_db2-1.9.1]# phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
[root@FLORA-FEDORA ibm_db2-1.9.1]# ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for IBM_DB2 support... yes, shared
checking Looking for DB2 CLI libraries... checking in yes...
checking in yes/lib64...
checking in yes/lib32...
checking in yes/lib...
not found
configure: error: Please reinstall the DB2 CLI distribution

となって、何か失敗したようです。

調べていると、
http://pecl.php.net/bugs/bug.php?id=14045
に同じような症状が書いてあり、

Seems like your DB2 is not installed properly, could you please
re-install it and then check if you are able to build ibm_db2. The
directory include should contain many more files like sqlcli1.h,
sqlcli.h, sql.h etc. while installing ibm_db2 it finds for DB2 CLI
include files in the include directory

と記載されていたので、以下のように再インストール

[root@FLORA-FEDORA expc]# ./db2_install

製品のインストール用のデフォルト・ディレクトリー - /opt/ibm/db2/V9.7

***********************************************************
別のディレクトリーを選択してインストールしますか [yes/no] ?
no
DB2 インストールを初期化しています。

実行されるタスクの合計数: 14
実行される全タスクの合計見積もり時間: 374

...省略

タスク #14 が終了しました。

正常

includeフォルダに、記載されているファイルは入ったようなのですが、
./configureの実行結果は結局エラーでした。

fedora14でpdoを利用するためには、どのようにすればよいのでしょうか。

./configureとかを利用する方法にはこだわりません。
簡単であればあるほどよいと思っています。

mysqlみたいに、
yumや、gpk-applicationを使って、簡単にできるなら、それがよいと考えています。

どなたかご存知の方、ご教授よろしくお願いいたします。

A 回答 (1件)

オプションを指定して、ライブラリを検出するのではないでしょうか。


./configure --with-IBM_DB2=/opt/ibm/db2/V9.7

ログと、PECL の記述から判断いたしました。当方 DB2 の経験はありません。
    • good
    • 0
この回答へのお礼

samcharyさん
ご返答ありがとうございます。ご指定いただいたコマンドを実行したところ
makefileができあがり
makeをしたところ
ibm_db2.soと
ibm_db2.laができました。
ありがとうございました。

お礼日時:2011/05/20 09:23

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!