[root@gsidc-ywxt-wl03 DB2]# pecl install ibm_db2 downloading ibm_db2-1.9.3.tgz ... Starting to download ibm_db2-1.9.3.tgz (156,494 bytes) .................................done: 156,494 bytes 5 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20050922 Zend Extension Api No: 220051025 DB2 Installation Directory? : /path/to/DB2 building in /var/tmp/pear-build-root/ibm_db2-1.9.3 running: /tmp/tmplV9Ev0/ibm_db2-1.9.3/configure --with-IBM_DB2=/path/to/DB2 checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking whether gcc and cc understand -c and -o together... yes checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-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 checking for PHP extension directory... /usr/lib/php/modules checking for PHP installed headers prefix... /usr/include/php checking for re2c... no configure: WARNING: You will need re2c 0.9.11 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 /path/to/DB2... checking in /path/to/DB2/lib64... checking in /path/to/DB2/lib32... checking in /path/to/DB2/lib... not found configure: error: Please reinstall the DB2 CLI distribution ERROR: `/tmp/tmplV9Ev0/ibm_db2-1.9.3/configure --with-IBM_DB2=/path/to/DB2' failed
You will need re2c 0.9.11 or later if you want to regenerate PHP parsers 你用版本太低了。 用re2c或是You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.搜一搜
http://www.cnblogs.com/gbyukg/archive/2011/10/09/2204916.html
这篇文章下面有安装db2扩展的说明(系统:centos db2版本>=975)
pecl install ibm_db2
downloading ibm_db2-1.9.3.tgz ...
Starting to download ibm_db2-1.9.3.tgz (156,494 bytes)
.................................done: 156,494 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
DB2 Installation Directory? : /path/to/DB2
building in /var/tmp/pear-build-root/ibm_db2-1.9.3
running: /tmp/tmplV9Ev0/ibm_db2-1.9.3/configure --with-IBM_DB2=/path/to/DB2
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-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
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 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 /path/to/DB2...
checking in /path/to/DB2/lib64...
checking in /path/to/DB2/lib32...
checking in /path/to/DB2/lib...
not found
configure: error: Please reinstall the DB2 CLI distribution
ERROR: `/tmp/tmplV9Ev0/ibm_db2-1.9.3/configure --with-IBM_DB2=/path/to/DB2' failed
你用版本太低了。
用re2c或是You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.搜一搜