歡迎您光臨本站 註冊首頁

/usr/bin/ld: skipping incompatible when searching for -lmysqlclient

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

/usr/bin/ld: skipping incompatible when searching for -lmysqlclient

:dizzy:  以前安裝php一點問題都沒有.今天換了64位卻安裝不下去了.

2.6.18 的內核 rhel5. 64位

安裝php --with-mysql=/soft/mysql
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... /tmp/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.

----------------------------------------------------
#cat config.logconfigure:60081: checking for MySQL support
configure:60128: checking for specified location of the MySQL UNIX socket
configure:60332: checking for mysql_close in -lmysqlclient
configure:60351: gcc -o conftest -I/usr/include -g -O2 -fvisibility=hidden  -Wl,-rpath,/soft/mysql/lib -L/soft/mysql/lib -L/usr/lib  -Wl,-rpath,/soft/zlib//lib -L/soft/zlib//lib -Wl,-rpath,/soft/jpeg//lib -L/soft/jpeg//lib -Wl,-rpath,/soft/libpng//lib -L/soft/libpng//lib -Wl,-rpath,/soft/freetype//lib -L/soft/freetype//lib -Wl,-rpath,/soft/gd//lib -L/soft/gd//lib conftest.c -lmysqlclient  -lgd -lfreetype -lpng -lz -ljpeg -lz -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: skipping incompatible /soft/mysql/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /soft/mysql/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/../lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 60340 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_close();

int main() {
mysql_close()
; return 0; }
configure:60574: checking for mysql_error in -lmysqlclient
configure:60593: gcc -o conftest -I/usr/include -g -O2 -fvisibility=hidden  -Wl,-rpath,/soft/mysql/lib -L/soft/mysql/lib -Wl,-rpath,/soft/zlib//lib -L/soft/zlib//lib -L/usr/lib  -Wl,-rpath,/soft/zlib//lib -L/soft/zlib//lib -Wl,-rpath,/soft/jpeg//lib -L/soft/jpeg//lib -Wl,-rpath,/soft/libpng//lib -L/soft/libpng//lib -Wl,-rpath,/soft/freetype//lib -L/soft/freetype//lib -Wl,-rpath,/soft/gd//lib -L/soft/gd//lib -Wl,-rpath,/soft/zlib/ -L/soft/zlib/ conftest.c -lmysqlclient  -lz -lgd -lfreetype -lpng -lz -ljpeg -lz -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: skipping incompatible /soft/mysql/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /soft/mysql/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/../lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 60582 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_error();

int main() {
mysql_error()
; return 0; }查了下,有可能是庫路徑不對啥的.也不太懂.
#echo $LD_LIBRARY_PATH
/usr/lib64::/usr/local/lib:/usr/lib64:/usr/lib64:/soft/mysql/lib:/usr/lib

/soft/mysql/lib里也有ls /soft/mysql/lib/ |grep libmysql
libmysqlclient.a
libmysqlclient.la
libmysqlclient_r.a
libmysqlclient_r.la
libmysqlclient_r.so
libmysqlclient_r.so.16
libmysqlclient_r.so.16.0.0
libmysqlclient.so
libmysqlclient.so.16
libmysqlclient.so.16.0.0
libmysqld.a請問各位,這是個神馬情況.:D
《解決方案》

:roll: 等高手
《解決方案》

:dizzy:來人呀~急呀!~~~~~都幹嘛去了.媳婦明天再泡!!:em11:
《解決方案》

來人呀~急呀!~~~~~都幹嘛去了.媳婦明天再泡!!
liyis永恆 發表於 2010-11-26 15:33 http://linux.chinaunix.net/bbs/images/common/back.gif


    不是安裝的這個mysql_install_db?
《解決方案》

回復 4# 版主殺手


    我就安裝php 支持mysql擴展呀.沒有別的.:lol:
《解決方案》

回復  版主殺手


    我就安裝php 支持mysql擴展呀.沒有別的.
liyis永恆 發表於 2010-11-26 15:46 http://linux.chinaunix.net/bbs/images/common/back.gif


    GD庫 ,libxml2 ...php所需的庫都安裝好了?
《解決方案》

回復 6# 版主殺手


    安裝好了.把 --with-mysql 去掉 可以完成安裝.  加上就出錯
《解決方案》

回復  版主殺手


    安裝好了.把 --with-mysql 去掉 可以完成安裝.  加上就出錯
liyis永恆 發表於 2010-11-26 16:02 http://linux.chinaunix.net/bbs/images/common/back.gif


    /usr/bin/ld: skipping incompatible /soft/mysql/lib/libmysqlclient.so
libmysqlclient--這個你沒安裝
你安裝mysql client和mysql server了嗎?
《解決方案》

回復  版主殺手


    安裝好了.把 --with-mysql 去掉 可以完成安裝.  加上就出錯
liyis永恆 發表於 2010-11-26 16:02 http://linux.chinaunix.net/bbs/images/common/back.gif


    看看這個帖子 和你的情況類似:http://topic.csdn.net/u/20100807/10/48573A9F-8173-4259-AB91-687D5CC0E62F.html
《解決方案》

回復 9# 版主殺手


    謝謝.這個我之前看過了 .

# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
/usr/lib64
/soft/mysql/lib


裡面也寫啦.問題依舊...

[火星人 ] /usr/bin/ld: skipping incompatible when searching for -lmysqlclient已經有594次圍觀

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