我尝试了很多关于如何在我的openSuse 11.4 64位计算机上安装PDO_OCI的教程,我无法让它工作。
我的工作是:
wget http://pecl.php.net/get/PDO_OCI
tar -xzvf PDO_OCI-1.0.tgz
cd PDO_OCI-1.0/
phpize
我得到了这个输出:
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level
尽管我发出了警告:
./configure --with-pdo-oci
它很好。 然后我运行make并停止:
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c -o pdo_oci.lo
mkdir .libs
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c -fPIC -DPIC -o .libs/pdo_oci.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c -o oci_driver.lo
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c -fPIC -DPIC -o .libs/oci_driver.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c -o oci_statement.lo
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c -fPIC -DPIC -o .libs/oci_statement.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=link gcc -std=gnu99 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -o pdo_oci.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/modules pdo_oci.lo oci_driver.lo oci_statement.lo -Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh
gcc -std=gnu99 -shared .libs/pdo_oci.o .libs/oci_driver.o .libs/oci_statement.o -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh -Wl,-rpath -Wl,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -Wl,-soname -Wl,pdo_oci.so -o .libs/pdo_oci.so
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib/libclntsh.so when searching for -lclntsh
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [pdo_oci.la] Error 1
感谢任何帮助。
答案 0 :(得分:0)
您是否尝试过安装via。 Yast(最佳选项)或pecl(pecl install PDO_OCI
)?
答案 1 :(得分:0)
我修改了config.m4如下:
--- config.m4.orig 2012-11-26 11:04:49.237538293 -0500
+++ config.m4 2012-11-26 11:31:35.693839416 -0500
@@ -208,15 +208,15 @@
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
- ifdef([PHP_CHECK_PDO_INCLUDES],
+ ifdef([PHP_CHECK_PDO_INCLUDES_CV],
[
- PHP_CHECK_PDO_INCLUDES
+ PHP_CHECK_PDO_INCLUDES_CV
],[
AC_MSG_CHECKING([for PDO includes])
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
- elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$abs_srcdir/ext
+ elif test -f $abs_srcdir/../pdo/php_pdo_driver.h; then
+ pdo_inc_path=$abs_srcdir/../../ext
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$prefix/include/php/ext
else
然后在php5-5.3.10 / ext / pdo_oci中调用:
autoconf -f
./configure
cp /usr/include/oracle/11.1.0.1/client64/* include/
make