安装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

即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值