I am trying to install the OCI8 extension on Red Hat 7 (PHP 5.6.x.) I have spent at least two days trying to figure this out including combing SuperUser and StackOverflow. So far none of the answers have fixed the problem.
I have the Oracle Instant Client installed at:
/usr/lib/oracle/12.1/client64/lib/
When I run the following command:
pecl install oci8-2.0.10 --with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib/
It asks me to provide the path to ORACLE_HOME. I confirmed this is already defined so I hit enter to continue. Once I do, it runs through the make commands and errors out at this:
/bin/sh /var/tmp/pear-build-rootb3mVn8/oci8-2.0.10/libtool --mode=compile cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-rootb3mVn8/oci8-2.0.10/include -I/var/tmp/pear-build-rootb3mVn8/oci8-2.0.10/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/home/oracle/oracle/product/rdbms/public -I/home/oracle/oracle/product/rdbms/demo -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-rootb3mVn8/oci8-2.0.10/include -I/var/tmp/pear-build-rootb3mVn8/oci8-2.0.10/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/home/oracle/oracle/product/rdbms/public -I/home/oracle/oracle/product/rdbms/demo -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:48:0:
/var/tmp/oci8/php_oci8_int.h:60:17: fatal error: oci.h: No such file or directory
#include <oci.h>
^
compilation terminated.
make: *** [oci8.lo] Error 1
ERROR: `make' failed
I understand that it cannot find the oci.h file. So i figure that if I provide it the location of the Oracle Instant Client it will go past that error. So at the previous command where it requests ORACLE_HOME environment variable, I supply it with the following:
checking Oracle ORACLE_HOME install directory... /usr/lib/oracle/12.1/client64/lib/
checking ORACLE_HOME library validity... configure: error: Expected an ORACLE_HOME top level directory but /usr/lib/oracle/12.1/client64/lib/ appears to be an Instant Client directory. Try --with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib/
ERROR: `/var/tmp/oci8/configure --with-oci8=/usr/lib/oracle/12.1/client64/lib/' failed
I am unable to figure out why it is failing. I heard that the SDK needs to be installed but to the best of my knowledge, when I installed the instant client, I also installed the SDK.
Any help would be much appreciated. Thanks!
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 205
تاريخ: شنبه
1 خرداد
1395 ساعت: 6:30