安装Magento ,配置php 环境遇到lltdl错误

安装 Magento时,需要配置php环境。

执行

./configure --prefix=/opt/local/php --with-apxs2=/opt/local/apache2/bin/apxs --with-mysql=/opt/local/mysql --with-pdo-mysql=/opt/local/mysql --with-curl --with-libxml-dir=/opt/local/libxml2 --with-gd=/opt/local/gd2 --with-jpeg-dir --with-png-dir --with-bz2 --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-openssl=/opt/local/openssl --with-mcrypt=/opt/local/libmcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --disable-cgi --disable-cli

得到了如下异常:

nfigure:60527: checking for MySQLi support
configure:60574: checking whether to enable embedded MySQLi support
configure:61349: checking for ncurses support
configure:62441: checking for Oracle (OCI8) support
configure:68651: checking whether to enable pcntl support
configure:69219: checking whether to enable PDO support
configure:69644: checking for PDO_DBLIB support via FreeTDS
configure:70354: checking for Firebird support for PDO
configure:71333: checking for MySQL support for PDO
configure:71411: checking for mysql_config
configure:71747: checking for mysql_query in -lmysqlclient
configure:71766: gcc -o conftest -I/usr/include -g -O2  -Wl,-rpath,/opt/local/mysql/lib -L/opt/local/mysql/lib -L/usr/lib  -Wl,-rpath,/opt/local/libxml2/lib -L/opt/local/libxml2/lib -Wl,-rpath,/opt/local/openssl/lib -L/opt/local/openssl/lib -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib -Wl,-rpath,/opt/local/gd2/lib -L/opt/local/gd2/lib -Wl,-rpath,/opt/local/libmcrypt/lib -L/opt/local/libmcrypt/lib -Wl,-rpath,/opt/local/mysql/lib -L/opt/local/mysql/lib -lmysqlclient -lz -lcrypt -lnsl -lm conftest.c -lmysqlclient  -lmysqlclient -lmcrypt -lltdl -lgd -lfreetype -lpng -lz -ljpeg -lssl -lcrypto -lcurl -lbz2 -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -lxml2 -lz -lm 1>&5
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
configure: failed program was:
#line 71755 "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_query();

int main() {
mysql_query()
; return 0; }
configure:72119: checking for mysql_query in –lmysqlclient

================

根据这个/usr/bin/ld: cannot find -lltdl,查找相关资料,进入到/libmcrypt-2.5.8/libltdl目录中

执行

./configure  -enable-ltdl-install

make

make install

即可

你可能感兴趣的:(Linux)