歡迎您光臨本站 註冊首頁

php 添加mysqli錯誤

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

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
《解決方案》

你的系統是什麼版本的,看報錯,是缺少probes_mysql的庫.找找吧
《解決方案》

回復 [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
《解決方案》

不清楚.你在php的源碼目錄下運行./configure --help,看下mysql的參數和你寫的是不是一致.
《解決方案》

本帖最後由 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,但是剛才被我刪除掉了,不知道有無影響
《解決方案》

可能是這個問題.你的mysql服務不是你自己編譯的嗎?
《解決方案》

版本問題。。。

[火星人 ] php 添加mysqli錯誤已經有686次圍觀

http://coctec.com/docs/service/show-post-11020.html