Error installing OCI8 on Ubuntu 14.04

5,847

mHouses, you are my hero. I spent 4 hours yesterday trying to install pecl_http-1.7.6 on my 32 bit ubuntu 14.04 with no avail. Your instructions worked perfect for me, too.

all I had to do was changing your

"./configure -with-oci8=shared,instantclient,$ORACLE_HOME"

to a simple

"./configure"

Thanks a lot for sharing your knowledge

Share:
5,847

Related videos on Youtube

mHouses
Author by

mHouses

SOreadytohelp

Updated on September 18, 2022

Comments

  • mHouses
    mHouses over 1 year

    I've just upgraded my VM to Ubuntu 14.04, and my OCI8 PHP driver has stopped working.

    I've tried to install/upgrade it, but it doesn't work. That's the error messages I get:

    marc@sf2:/build/buildd/php5-5.5.9+dfsg/pear-build-download$ sudo pecl install oci8
    downloading oci8-2.0.8.tgz ...
    Starting to download oci8-2.0.8.tgz (190,854 bytes)
    .........................................done: 190,854 bytes
    could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/oci8-2.0.8.tgz"
    Download of "pecl/oci8" succeeded, but it is not a valid package archive
    Error: cannot download "pecl/oci8"
    Download failed
    install failed
    

    I've "untared" the file oci8-2.0.8.tgz without problems and the package.xml is there... What can I do to fix this? Must I revert to Ubuntu 13.10? Because I need oci8 for my job to be done...

    Thanks for your help!

    EDIT: I've found the problem: PECL isn't working on Ubuntu 14.04 and OCI8 must be installed from source or using a phar package. I'm still looking for information about how to install it.

    EDIT 2: I've found it!

    1. Download and extract the oci8 library from PECL repository (http://pecl.php.net/package/oci8)
    2. Run the phpize command to create the build scripts
    3. With the InstantClient installed, run ./configure -with-oci8=shared,instantclient,$ORACLE_HOME
    4. Finally, run a make install and /etc/init.d/apache2 restart

    All this information is taken from the PHP OCI8 Installation Guide (http://php.net/manual/en/oci8.installation.php)

  • mHouses
    mHouses almost 9 years
    Link to your blog is broken... Please, try to fix it.
  • thucnguyen
    thucnguyen almost 8 years
    Sorry, my blog has been move here: itblog.study.land/…