免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7992 | 回复: 2
打印 上一主题 下一主题

php扩展mysqli报错 [复制链接]

论坛徽章:
1
处女座
日期:2014-01-14 13:59:48
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-02-18 09:57 |只看该作者 |倒序浏览
今天安装LNMP的时候,php需要扩展mysqli,结果出来如下错误:
checking for PHP prefix... Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
checking for PHP includes... Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
checking for PHP extension directory... Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
checking for PHP installed headers prefix... Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for MySQLi support... yes, shared
checking whether to enable embedded MySQLi support... shared
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.


数据库已经安装好了。版本是5.5.32 ,php版本是5.4.16
请各位大侠帮忙看看。

论坛徽章:
1
处女座
日期:2014-01-14 13:59:48
2 [报告]
发表于 2014-02-18 10:13 |只看该作者
以下为config.log的记录
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ ./configure --with-php-config=/app/php5/bin/php-config --with-mysqli=/app/mysql/bin/mysql_config --enable-embedded-mysqli=shared --enable-shared

## --------- ##
## Platform. ##
## --------- ##

hostname = localhost.localdomain
uname -m = x86_64
uname -r = 2.6.32-279.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Fri Jun 22 12:19:21 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/lib64/qt-3.3/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1985: checking for grep that handles long lines and -e
configure:2045: result: /bin/grep
configure:2050: checking for egrep
configure:2114: result: /bin/grep -E
configure:2119: checking for a sed that does not truncate output
configure:2173: result: /bin/sed
configure:2305: checking for cc
configure:2321: found /usr/bin/cc
configure:2332: result: cc
configure:2366: checking for C compiler version
configure:2374: cc --version >&5
cc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2378: $? = 0
configure:2385: cc -v >&5
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
configure:2389: $? = 0
configure:2396: cc -V >&5
cc: '-V' option must have argument
configure:2400: $? = 1
configure:2423: checking for C compiler default output file name
configure:2445: cc    conftest.c  >&5
configure:2449: $? = 0
configure:2487: result: a.out
configure:2506: checking whether the C compiler works
configure:2516: ./a.out
configure:2520: $? = 0
configure:2539: result: yes
configure:2546: checking whether we are cross compiling
configure:2548: result: no
configure:2551: checking for suffix of executables
configure:2558: cc -o conftest    conftest.c  >&5
configure:2562: $? = 0
configure:2588: result:
configure:2594: checking for suffix of object files
configure:2620: cc -c   conftest.c >&5
configure:2624: $? = 0
configure:2649: result: o
configure:2653: checking whether we are using the GNU C compiler
configure:2682: cc -c   conftest.c >&5
configure:2689: $? = 0
configure:2706: result: yes
configure:2715: checking whether cc accepts -g
configure:2745: cc -c -g  conftest.c >&5
configure:2752: $? = 0
configure:2853: result: yes
configure:2870: checking for cc option to accept ISO C89
configure:2944: cc  -c -g -O2  conftest.c >&5
configure:2951: $? = 0
configure:2974: result: none needed
configure:2998: checking how to run the C preprocessor
configure:3038: cc -E  conftest.c
configure:3045: $? = 0
configure:3076: cc -E  conftest.c
conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
configure:3083: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:3116: result: cc -E
configure:3145: cc -E  conftest.c
configure:3152: $? = 0
configure:3183: cc -E  conftest.c
conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
configure:3190: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:3232: checking for icc
configure:3245: result: no
configure:3259: checking for suncc
configure:3272: result: no
configure:3290: checking whether cc understands -c and -o together
configure:3322: cc -c conftest.c -o conftest2.o >&5
configure:3326: $? = 0
configure:3332: cc -c conftest.c -o conftest2.o >&5
configure:3336: $? = 0
configure:3391: result: yes
configure:3407: checking for system library directory
configure:3422: result: lib
configure:3429: checking if compiler supports -R
configure:3458: cc -o conftest -g -O2   conftest.c -R /usr/lib  >&5
cc: unrecognized option '-R'
/usr/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
configure:3465: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3487: result: no
configure:3492: checking if compiler supports -Wl,-rpath,
configure:3521: cc -o conftest -g -O2   conftest.c -Wl,-rpath,/usr/lib  >&5
configure:3528: $? = 0
configure:3550: result: yes
configure:3599: checking build system type
configure:3617: result: x86_64-unknown-linux-gnu
configure:3639: checking host system type
configure:3654: result: x86_64-unknown-linux-gnu
configure:3676: checking target system type
configure:3691: result: x86_64-unknown-linux-gnu
configure:3800: checking for PHP prefix
configure:3802: result: /app/php5
configure:3804: checking for PHP includes
configure:3806: result: -I/app/php5/include/php -I/app/php5/include/php/main -I/app/php5/include/php/TSRM -I/app/php5/include/php/Zend -I/app/php5/include/php/ext -I/app/php5/include/php/ext/date/lib
configure:3808: checking for PHP extension directory
configure:3810: result: /app/php5/lib/php/extensions/no-debug-non-zts-20100525
configure:3812: checking for PHP installed headers prefix
configure:3814: result: /app/php5/include/php
configure:3817: checking if debug is enabled
configure:3847: result: no
configure:3850: checking if zts is enabled
configure:3880: result: no
configure:3951: checking for re2c
configure:3981: result: no
configure:4006: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
configure:4020: checking for gawk
configure:4037: found /bin/gawk
configure:4048: result: gawk
configure:4096: checking for MySQLi support
configure:4136: result: yes, shared
configure:4145: checking whether to enable embedded MySQLi support
configure:4159: result: shared
configure:4297: checking for mysql_set_server_option in -lmysqlclient
configure:4332: cc -o conftest -g -O2  -Wl,-rpath,/app/mysql/lib -L/app/mysql/lib  -lmysqlclient -lprobes_mysql -lz -lm -lrt -ldl conftest.c -lmysqlclient   >&5
/usr/bin/ld: cannot find -lprobes_mysql
collect2: ld returned 1 exit status
configure:4339: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char mysql_set_server_option ();
| int
| main ()
| {
| return mysql_set_server_option ();
|   ;
|   return 0;
| }
configure:4362: result: no
configure:4697: error: wrong mysql library version or lib not found. Check config.log for more information.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_lib_mysqlclient___mysql_set_server_option=no
ac_cv_objext=o
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_GREP=/bin/grep
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP='cc -E'
ac_cv_prog_ac_ct_CC=cc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_cc_c_o=yes
ac_cv_prog_cc_g=yes
ac_cv_target=x86_64-unknown-linux-gnu
lt_cv_path_SED=/bin/sed
php_cv_cc_dashr=no
php_cv_cc_rpath=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AWK='gawk'
CC='cc'
CFLAGS='-g -O2'
CONFIGURE_COMMAND=' '\''./configure'\''  '\''--with-php-config=/app/php5/bin/php-config'\'' '\''--with-mysqli=/app/mysql/bin/mysql_config'\'' '\''--enable-embedded-mysqli=shared'\'' '\''--enable-shared'\'''
CONFIGURE_OPTIONS=' '\''--with-php-config=/app/php5/bin/php-config'\'' '\''--with-mysqli=/app/mysql/bin/mysql_config'\'' '\''--enable-embedded-mysqli=shared'\'' '\''--enable-shared'\'''
CPP='cc -E'
CPPFLAGS=''
DEFS=''
DSYMUTIL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
GREP='/bin/grep'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
NMEDIT=''
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RE2C='exit 0;'
SED='/bin/sed'
SHELL='/bin/sh'
SHLIB_DL_SUFFIX_NAME='so'
SHLIB_SUFFIX_NAME='so'
STRIP=''
ac_ct_CC='cc'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias='x86_64-unknown-linux-gnu'
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/app/php5'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='unknown'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""

configure: exit 1

论坛徽章:
4
双子座
日期:2014-08-28 10:08:002015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:58:112015年亚洲杯之阿联酋
日期:2015-03-13 03:25:15
3 [报告]
发表于 2014-02-18 14:50 |只看该作者
原因可能是你的php在编译的时候需要mysql的库   而这台机器上没有安装mysql的库,可以安装一下

或者也可以使用mysqlnd
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP