我需要为MacOSX(High Sierra)安装oci8驱动程序。但是,每当我运行pecl install oci8命令时,都会被询问。
请提供ORACLE_HOME目录的路径。如果要使用Oracle Instant Client [autodetect]进行编译,请使用“ instantclient,/ path / to / instant / client / lib”。
我用'instantclient,/ opt / oracle / instantclient_12_2'和
building in /private/tmp/pear/temp/pear-build-aneakellOvIf6k/oci8-2.2.0
running: /private/tmp/pear/temp/oci8/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-oci8='instantclient, /opt/oracle/instantclient_12_2'
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin17.7.0
checking host system type... x86_64-apple-darwin17.7.0
checking target system type... x86_64-apple-darwin17.7.0
checking for PHP prefix... /usr/local/Cellar/php/7.3.5
checking for PHP includes... -I/usr/local/Cellar/php/7.3.5/include/php -I/usr/local/Cellar/php/7.3.5/include/php/main -I/usr/local/Cellar/php/7.3.5/include/php/TSRM -I/usr/local/Cellar/php/7.3.5/include/php/Zend -I/usr/local/Cellar/php/7.3.5/include/php/ext -I/usr/local/Cellar/php/7.3.5/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php/7.3.5/pecl/20180731
checking for PHP installed headers prefix... /usr/local/Cellar/php/7.3.5/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.1.1 (ok)
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for Oracle Database OCI8 support... yes, shared
checking PHP version... 7.3.5, ok
checking OCI8 DTrace support... no
checking size of long int... 8
checking checking if we're on a 64-bit platform... yes
checking Oracle Instant Client directory... /opt/oracle/instantclient_12_2
checking Oracle Instant Client SDK header directory... configure: error: Oracle Instant Client SDK header files not found
ERROR: `/private/tmp/pear/temp/oci8/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-oci8='instantclient, /opt/oracle/instantclient_12_2'' failed
是输出。
我尝试过在线下载oci8.2.2.0.zip并手动配置而不使用pecl。但是,这并未证明是成功的。
当前,我的/ opt / oracle / instantclient_12_2如下所示:
-r-xr-xr-x@ 1 root wheel 342 Apr 24 2015 glogin.sql
-r--r--r--@ 1 root wheel 4036257 Dec 13 2016 ojdbc8.jar
-r--r--r--@ 1 root wheel 74230 Jan 26 2017 xstreams.jar
-r-xr-xr-x@ 1 root wheel 8179072 Jun 28 2017 libnnz12.dylib
-r-xr-xr-x@ 1 root wheel 1639388 Jul 12 2017 libsqlplusic.dylib
-r-xr-xr-x@ 1 root wheel 151748 Aug 8 2017 libocijdbc12.dylib
-r-xr-xr-x@ 1 root wheel 237780 Jan 8 2018 libons.dylib
-rwxrwxrwx@ 1 root wheel 1267088 Jan 9 2018 libsqlplus.dylib
-rwxrwxrwx@ 1 root wheel 84988 Jan 9 2018 liboramysql12.dylib
-rwxrwxrwx@ 1 root wheel 1465312 Jan 9 2018 libocci.dylib.12.1
-rwxrwxrwx@ 1 root wheel 4685408 Jan 9 2018 libclntshcore.dylib.12.1
-rwxrwxrwx@ 1 root wheel 85621532 Jan 9 2018 libclntsh.dylib.12.1
-rwxrwxrwx@ 1 root wheel 124769196 Jan 9 2018 libociei.dylib
-rw-rw-rw-@ 1 root wheel 400 Jan 9 2018 BASIC_README
-rwxrwxrwx@ 1 root wheel 146084 Jan 9 2018 uidrvci
-rwxrwxrwx@ 1 root wheel 40360 Jan 9 2018 genezi
-rwxrwxrwx@ 1 root wheel 10036 Jan 9 2018 adrci
-rwxr-xr-x@ 1 root wheel 8480 Jan 9 2018 sqlplus
-rw-rw-rw-@ 1 root wheel 404 Jan 9 2018 SQLPLUS_README
lrwxrwxrwx 1 root wheel 20 Jun 12 15:36 libclntsh.dylib -> libclntsh.dylib.12.1
lrwxrwxrwx 1 root wheel 18 Jun 12 15:36 libocci.dylib -> libocci.dylib.12.1
drwxrwxrwx@ 8 root wheel 256 Jun 12 15:53 sdk