I am trying to install oci8 using "pecl install oci8" command but getting error as -

fatal error: zend_smart_str.h: No such file or directory
 #include "zend_smart_str.h"

following are my system details - 1.ubuntu 14.04 2.php 7.0.17-2+deb.sury.org~trusty+1

steps I followed -

  1. download instantclient-basic-linux-

  2. download instantclient-sdk-linux.x64-

  3. create dir in /opt/oracle
  4. extract both zip files
  5. run pecl install oci8 command

Outout -

/bin/bash /tmp/oci8-2.1.4/libtool --mode=compile cc  -I. -I/tmp/oci8-2.1.4 -DPHP_ATOM_INC -I/tmp/oci8-2.1.4/include -I/tmp/oci8-2.1.4/main -I/tmp/oci8-2.1.4 -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/opt/oracle/instantclient_12_2/sdk/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/oci8-2.1.4/oci8.c -o oci8.lo 
libtool: compile:  cc -I. -I/tmp/oci8-2.1.4 -DPHP_ATOM_INC -I/tmp/oci8-2.1.4/include -I/tmp/oci8-2.1.4/main -I/tmp/oci8-2.1.4 -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/opt/oracle/instantclient_12_2/sdk/include -DHAVE_CONFIG_H -g -O2 -c /tmp/oci8-2.1.4/oci8.c  -fPIC -DPIC -o .libs/oci8.o
/tmp/oci8-2.1.4/oci8.c:36:28: fatal error: zend_smart_str.h: No such file or directory
 #include "zend_smart_str.h"
compilation terminated.
make: *** [oci8.lo] Error 1

Please help!! Thanks much.

  1. php 7.0.17-2+deb.sury.org~trusty+1

sudo apt-get install php7.0-dev

Provides /usr/include/php/20151012/Zend/zend_smart_str.h

  • okay let me check it and will update. Thank you!! – Sachin Vairagi Apr 21 '17 at 8:10
  • sorry it didn't work, however I have resolved it by downloading lower version - instantclient-basic-linux.x64- and instantclient-sdk-linux.x64- Thanks much for your reply. – Sachin Vairagi Apr 26 '17 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.