2017-05-24 118 views
0

我正在嘗試將我的fedora 25 webserver - php連接到Oracle數據庫。PHP oci8不會通過pecl安裝

爲此,我需要pecl安裝oci8。

但是我得到這個錯誤:

/bin/sh /var/tmp/pear-build-roottqYEC6/oci8-2.1.4/libtool --mode=compile cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-roottqYEC6/oci8-2.1.4/include -I/var/tmp/pear-build-roottqYEC6/oci8-2.1.4/main -I/var/tmp/oci8 -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 -I/usr/include/oracle/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -o oci8.lo 
libtool: compile: cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-roottqYEC6/oci8-2.1.4/include -I/var/tmp/pear-build-roottqYEC6/oci8-2.1.4/main -I/var/tmp/oci8 -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 -I/usr/include/oracle/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -fPIC -DPIC -o .libs/oci8.o 
In file included from /var/tmp/oci8/oci8.c:49:0: 
/var/tmp/oci8/php_oci8_int.h:46:29: fatal error: oci8_dtrace_gen.h: No such file or directory 
#include "oci8_dtrace_gen.h" 
          ^
compilation terminated. 
Makefile:196: recipe for target 'oci8.lo' failed 
make: *** [oci8.lo] Error 1 
ERROR: `make' failed 

我不知道該怎麼辦。我到處尋找解決方案,我只能找到過時的文章。

任何幫助非常感謝!

回答

1

您的PHP似乎是在啓用了DTrace支持的情況下構建的。由於與PHP一些限制打造&配置文件中,PECL OCI8安裝需要一個暗示,也建立使用DTrace:

$ export PHP_DTRACE=yes 
$ pecl install oci8 

http://php.net/manual/en/oci8.dtrace.php

被提及