redhat6.7版,安装oci8扩展时,对oci8解压编绎时出错,求大神教一下。

直接上操作过程
rpm -ivh oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm
rpm -ivh oracle-instantclient11.2-devel-11.2.0.1.0-1.i386.rpm
rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.i386.rpm
tar zxvf oci8-1.4.5.tgz
cd oci8-1.4.5
/usr/bin/phpize
显示Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212

./configure --with-php-config=/usr/bin/php-config --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib
部分结尾显示:

checking command to parse /usr/bin/nm -B output from cc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
然后make部分结尾显示:
libtool: compile: cc -I. -I/root/oci8-1.4.5 -DPHP_ATOM_INC -I/root/oci8-1.4.5/include -I/root/oci8-1.4.5/main -I/root/oci8-1.4.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.2/client -DHAVE_CONFIG_H -g -O2 -c /root/oci8-1.4.5/oci8.c -fPIC -DPIC -o .libs/oci8.o
/root/oci8-1.4.5/oci8.c: In function ‘php_oci_do_connect_ex’:
/root/oci8-1.4.5/oci8.c:1760: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’
/root/oci8-1.4.5/oci8.c:1856: warning: cast from pointer to integer of different size
/root/oci8-1.4.5/oci8.c:2083: warning: cast to pointer from integer of different size
make: *** [oci8.lo] Error 1

这个问题要怎么解决呢?编绎的地址都是对的。

第1个回答  2017-05-26
首先安装Oracleclient前往官网下载instant-client安装程序以Redhat32bit为例,这里选择下载InstantClientforLinuxx86然后选择你要安装的client版本,目前Linux下使用Version10.2.0.5版本较为合适下载并安装安装basic和devel这两个包oracle-instantclient-basic-10.2.0.5-1.i386.rpmoracle-instantclient-devel-10.2.0.5-1.i386.rpmrpm-ivhoracle-instantclient11.2-basic-11.2.0.3.0-1.i386.rpmrpm-ivhoracle-instantclient11.2-devel-11.2.0.3.0-1.i386.rpm下面重点了:=============================================解压缩命令:tarzxvfoci8-1.4.10.tgz一、32位linux系统下oci8的安装:/usr/local/php/bin/phpizeCFLAGS="-I/usr/include/oracle/11.2/client/"CXXFLAGS="-I/usr/include/oracle/11.2/client/"./configure--with-php-config=/usr/local/php/bin/php-config--with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib二、64位linux系统下oci8的安装:/usr/local/php/bin/phpizeCFLAGS="-I/usr/include/oracle/11.2/client64/"CXXFLAGS="-I/usr/include/oracle/11.2/client64/"./configure--with-php-config=/usr/local/php/bin/php-config--with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib三、在php的配置文件php.ini添加:extension="oci8.so"四、重启apache服务追问

我的是linux64位的,前面的都已经装好了。用了你的命令行,还是提示错误,错误还是一样的。

相关了解……

你可能感兴趣的内容

大家正在搜

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网