免费注册 查看新帖 |

Chinaunix

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

[Web] php 添加mysqli错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-10-31 15:49 |只看该作者 |倒序浏览
  1. 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
  2. /usr/bin/ld: cannot find -lprobes_mysql
  3. collect2: ld returned 1 exit status
  4. configure:4701: $? = 1
  5. configure: failed program was:
  6. | /* confdefs.h.  */
  7. | #define PACKAGE_NAME ""
  8. | #define PACKAGE_TARNAME ""
  9. | #define PACKAGE_VERSION ""
  10. | #define PACKAGE_STRING ""
  11. | #define PACKAGE_BUGREPORT ""
  12. | /* end confdefs.h.  */
  13. |
  14. | /* Override any GCC internal prototype to avoid an error.
  15. |    Use char because int might match the return type of a GCC
  16. |    builtin and then its argument prototype would still apply.  */
  17. | #ifdef __cplusplus
  18. | extern "C"
  19. | #endif
  20. | char mysql_set_server_option ();
  21. | int
  22. | main ()
  23. | {
  24. | return mysql_set_server_option ();
  25. |   ;
  26. |   return 0;
  27. | }
  28. configure:4724: result: no
  29. 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

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
2 [报告]
发表于 2013-10-31 16:04 |只看该作者
你的系统是什么版本的,看报错,是缺少probes_mysql的库.找找吧

论坛徽章:
0
3 [报告]
发表于 2013-10-31 16:10 |只看该作者
回复 [url=forum.php
?mod=redirect&goto=findpost&pid=&ptid=4103866]2#[/url] chenyx


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

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
4 [报告]
发表于 2013-10-31 16:16 |只看该作者
不清楚.你在php的源码目录下运行./configure --help,看下mysql的参数和你写的是不是一致.

论坛徽章:
0
5 [报告]
发表于 2013-10-31 16:26 |只看该作者
本帖最后由 helloiac 于 2013-10-31 16:30 编辑

回复 4# chenyx
  1.   ./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,但是刚才被我删除掉了,不知道有无影响

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
6 [报告]
发表于 2013-10-31 16:46 |只看该作者
可能是这个问题.你的mysql服务不是你自己编译的吗?

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每月发帖之星
日期:2015-09-11 19:30:52IT运维版块每周发帖之星
日期:2015-09-11 19:20:31IT运维版块每日发帖之星
日期:2015-08-26 06:20:00每日论坛发贴之星
日期:2015-08-20 06:20:00IT运维版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15金牛座
日期:2014-05-04 16:58:09双子座
日期:2013-12-17 16:44:37辰龙
日期:2013-11-22 15:20:59狮子座
日期:2013-11-18 22:55:08射手座
日期:2013-11-12 10:54:26
7 [报告]
发表于 2013-11-01 09:22 |只看该作者
版本问题。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP