make出現以下訊息
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status make[3]: *** [mydns] Error 1 make[3]: Leaving directory `/root/mydns-1.2.8.31/src/mydns' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/mydns-1.2.8.31/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/mydns-1.2.8.31' make: *** [all] Error 2 [root@fms003 mydns-1.2.8.31]
關鍵的訊息是以下兩行
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
在64位元系統中,/usr/lib/mysql/下的相關庫檔無法標識,需要將/usr/lib64/mysql 下的庫來做個軟連結
# ln -sf /usr/lib64/mysql/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so # ln -sf /usr/lib64/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient.a
再重新make;make install就正常了