6

According to this (Installing OCI8 from PECL, automated), all I have to do is type in pecl oci8 install.

But that only gets me the following error, repeatedly.

No releases available for package pecl.php.net/oci8.

Another website suggested that I try pear install pecl/oci8. Same error happens.

What do I do to fix this?

zack_falcon
  • 4,186
  • 20
  • 62
  • 108
  • Tried? http://voidweb.com/2011/04/how-to-install-php-oci8-extension/ – Jenson M John Jan 15 '14 at 08:24
  • 1
    Yes, actually, I did try manually doing things, but it is very prone to error, and in my experience, difficult to reverse should things go wrong. Anyway, if nothing else works, I'll give it another shot. – zack_falcon Jan 15 '14 at 08:29

1 Answers1

5

I have the same error on Ubuntu LTS 14.04:

~$ sudo pecl install oci8
No releases available for package "pecl.php.net/oci8"
install failed

Finally the reason is the Proxy problem: my computer is sitting after the company proxy server. Run the following command to add the proxy

~$ sudo pear config-set http_proxy http://proxy.mycompany.com:8080/
config-set succeeded

Then run the command again, it works as bellow

~$ 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
11 source files, building
running: phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212

Here we type in the Oracle Instant client folder as bellow:

Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : instantclient,/opt/oracle/instantclient_12_1

Then the command line continue ouputs:

building in /tmp/pear/temp/pear-build-rootJafknN/oci8-2.0.8
running: /tmp/pear/temp/oci8/configure --with-oci8=instantclient,/opt/oracle/instantclient_12_1
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
...
...
Build process completed successfully
Installing '/usr/lib/php5/20121212/oci8.so'
install ok: channel://pecl.php.net/oci8-2.0.8
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini

Good luck.

Happy
  • 757
  • 9
  • 18