今天重新 complier PHP 時,一直發生這行錯誤 ~




sapi/cgi/getopt.lo ..... (略)

/usr/bin/ld: cannot find -lltdl

*** Error code 1

Stop in /usr/home/sysman/php-4.4.2




過去都沒有這行訊息丫,而我先前 configure PHP 的參數如下



./configure --prefix=/www/php
--with-apxs2=/www/bin/apxs
--with-config-file-path=/www/php
--enable-mbstring=tw
--enable-ftp --with-mysql
--with-iconv --with-mcrypt --with-gettext
--with-gd --with-zlib --with-jpeg --with-png



經過 Google 大神的開導之下,找到了 Robinz's Blog 這篇文章,原因就是出在 --with-mcrypt 這裡了 / \

若按照先前我所PO的Apache + PHP + MySQL Tarball 安裝法
那麼在你的 /usr/ports/distfiles/ 裡面就應該有 libmcrypt-2.5.7.tar.gz ( 視當時版本 )
因此我重新再做了下面的步驟




tar zxvf libmcrypt-2.5.7.tar.gz

cd libmcrypt-2.5.7/libltdl

./configure –enable-ltdl-install

make

make install




此時再重新回去 compiler PHP ( make ) ,Yeah ! 過了,沒有 Error message 了 :D

後續發現我的 PHP GD 這部份不支援 JPEG,因此也重新再改了一下 configure php 的參數,如下 :



./configure --prefix=/www/php
--with-apxs2=/www/bin/apxs
--with-config-file-path=/www/php
--enable-mbstring=tw
--enable-ftp --with-mysql=/www/mysql
--with-iconv --with-mcrypt
--with-gettext --with-gd
--with-zlib-dir=/usr/local/lib
--with-jpeg-dir=/usr/local/lib
--with-png-dir=/usr/local/lib
--with-freetype-dir=/usr/local/lib
--with-ttf=/usr/local/lib
--enable-gd-native-ttf
--with-dom --with-dom-xslt
--with-dom-exslt --with-libxml --with-regex=php



Restart Apache , 大功告成 !

Posted by bojack at 痞客邦 PIXNET 留言(0) 引用(1) 人氣()


open trackbacks list Trackbacks (1)

  • test

    test...

留言列表 (0)

Post Comment

You haven’t logged in yet, please use guest status to leave message. You can also log in with above service account and leave message

other options