I am trying to compile OCI8 for PHP

sudo pecl install ./oci8-2.2.0.tgz 

Asks me oracle for the path to the roacle home folder, but I get the following error "Checking ORACLE_HOME library validity... configure: error: Exrected an ORACLE_HOME top-level directory but /usr/local/lib/oracle/instantclient appears to be an Instant Client directory. Try --with-oci8=instantclient,/usr/local/lib/oracle/instantclient

I tried

sudo pecl install ./oci8-2.2.0.tgz  --with-oci8=instantclient,/usr/local/lib/oracle/instantclien

But also got an error.

How do I properly install OCI8 using pecl? (sadly I cannot use binary package apt install)


First extract it .tgz file.

If you have one file in .tgz compress, just double-click it. İf you have more files in .tgz and you have "configure" file in folder

Type in folder (terminal):

sudo make install

If you have runable .sh file in folder

Type in folder (terminal):


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.