helloiac 发表于 2013-10-31 15:49

php 添加mysqli错误

configure:4694: cc -o conftest -g -O2-Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib-lmysqlclient -lprobes_mysql -lm -lrt -ldl conftest.c -lmysqlclient   >&5
/usr/bin/ld: cannot find -lprobes_mysql
collect2: ld returned 1 exit status
configure:4701: $? = 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:4724: result: no
configure:5059: error: wrong mysql library version or lib not found. Check config.log for more information.
怎么破,用的是percona-server版的mysql 5.5
没有找到lprobes_mysql

#/usr/local/php/bin/phpize
#./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config

chenyx 发表于 2013-10-31 16:04

你的系统是什么版本的,看报错,是缺少probes_mysql的库.找找吧

helloiac 发表于 2013-10-31 16:10

回复 [url=forum.php
?mod=redirect&goto=findpost&pid=&ptid=4103866]2# chenyx

find 没有找到
在mysql 的安装包中有include中
probes_mysql_nodtrace.h
probes_mysql.h
probes_mysql.d.base
我另外一台
使用相同的mysql+php+nginx环境中,php 有mysqli模块,但是我用find也没有在系统目录中找到probes_mysql

chenyx 发表于 2013-10-31 16:16

不清楚.你在php的源码目录下运行./configure --help,看下mysql的参数和你写的是不是一致.

helloiac 发表于 2013-10-31 16:26

本帖最后由 helloiac 于 2013-10-31 16:30 编辑

回复 4# chenyx ./configure --prefix=/usr/local/php --with-config-file-path=$path_php/etc --with-msyql=$path_mysql --with-openssl --with-mysqli=$path_mysql/bin/mysql_config --with-pdo-mysql=$path_mysql --with-gd --enable-fastcgi --enable-force-cgi-redirect --enable-discard-path --with-mysql=$path_mysql --disable-debug --enable-mbstring --with-ttf --enable-gd-native-ttf --enable-gd-jis-conv --enable-ftp --with-curlwrappers --enable-sockets --enable-zip --enable-bcmath --enable-calendar --enable-exif --enable-soap --disable-cli这是我从新编译PHP使用的参数,但是碰到了相同的问题
configure: error: wrong mysql library version or lib not found. Check config.log for more information.

会不会是mysql version 引发的问题,应为系统中不知道什么时候因为依赖问题装上了mysql-server,但是刚才被我删除掉了,不知道有无影响

chenyx 发表于 2013-10-31 16:46

可能是这个问题.你的mysql服务不是你自己编译的吗?

wenhq 发表于 2013-11-01 09:22

版本问题。。。
页: [1]
查看完整版本: php 添加mysqli错误