引用 | 編輯
lapson
2006-04-16 00:30 |
樓主
▼ |
||
x0
我己照住 http://linux.vbird.org/linux_server/0360apache.php的tarball方法去安裝lamp 一直也沒有問題除了安裝mysql 後看不到 [root@test mysql]# netstat -tl | grep mysql tcp 0 0 *:mysql *:* LISTEN 但很奇怪照樣可以用/usr/local/mysql/bin/mysql -u root -p 入到mysql 我沒有理會, 繼續做下面的步驟去安裝apache ,也很正常 直至到編譯php 時就發生錯誤 我compile 時打了以下option ./configure --prefix=/usr/local/php4 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php4 編譯也可以,但在最尾時就發生以下錯誤信息 checking for mysql_close in -lmysqlclient... no checking for mysql_errno in -lmysqlclient... no configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information. [root@Server php-4.4.2]# 當然也不能打make 和make install 啦~~ 我也看過config.log 最後幾行 int main() { mysql_close() ; return 0; } configure:63006: checking for mysql_errno in -lmysqlclient configure:63025: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/mysql/lib -L/usr$ /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status configure: failed program was: #line 63014 "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_errno(); int main() { mysql_errno() ; return 0; } 究竟發生了什麼事,是不是mysql 不能正常在netstat 顯示確導致??又怎樣解決呢?我試過不加with-mysql 的option,發現就正常編譯, 但是試過faile to connect mysql server 什麼MySQL Server Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client ( 1251 ) netstat -tl 的結果是 [root@Server php-4.4.2]# netstat -tl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:3306 *:* LISTEN tcp 0 0 *:netbios-ssn *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:www *:* LISTEN [root@Server php-4.4.2]# 而ps -aux | grep mysql 卻看到那4行 嗚~~我真的有照著做啊~~做了兩日都自己解決不了,所以來求各位大大幫忙啊~有什麼要看的我也會以最快速度post 上來....... (p.s. 我用的是tubrolinux 7.0) x0
|
引用 | 編輯
mylinux
2006-04-17 18:27 |
1樓
▲ ▼ |
tubrolinux 7.0 這台如果有上網服務, 建議更新為最新版,
畢竟那麼古老的 Linux 安全性非常堪慮. 新版的 lamp 套件應該都有了, 如無特殊需求, 不需自己編譯. x0 |
引用 | 編輯
mnbmnb5266
2010-08-22 22:52 |
2樓
▲ |
更新版本應該是個不錯的解決辦法,這樣就不必自己編譯了
x0 |