4
根據this(自動從PECL安裝OCI8),我所要做的就是輸入pecl oci8 install
。如何將OCI8安裝到現有的PHP?
但是,這隻會讓我重複出現以下錯誤。
No releases available for package pecl.php.net/oci8
。其他網站建議我嘗試pear install pecl/oci8
。同樣的錯誤發生。
我該如何解決這個問題?
根據this(自動從PECL安裝OCI8),我所要做的就是輸入pecl oci8 install
。如何將OCI8安裝到現有的PHP?
但是,這隻會讓我重複出現以下錯誤。
No releases available for package pecl.php.net/oci8
。其他網站建議我嘗試pear install pecl/oci8
。同樣的錯誤發生。
我該如何解決這個問題?
我有同樣的錯誤在Ubuntu 14.04 LTS:
~$ sudo pecl install oci8
No releases available for package "pecl.php.net/oci8"
install failed
最後的原因是代理問題:我的電腦是公司代理服務器後坐。運行以下命令來添加代理
~$ sudo pear config-set http_proxy http://proxy.mycompany.com:8080/
config-set succeeded
然後再次運行該命令,它
~$ 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
在這裏,我們在Oracle即時客戶端文件夾爲波紋管式工作波紋管:
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
然後命令行繼續輸出:
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
祝你好運。
試過了嗎? http://voidweb.com/2011/04/how-to-install-php-oci8-extension/ –
是的,實際上,我確實嘗試過手動做事,但它很容易出錯,而根據我的經驗,如果事情出錯,扭轉局面。無論如何,如果沒有其他的工作,我會再投入一次。 –