/usr/bin/ld: cannot find -lltdl php安装错误,libmcrypt编译问题


/usr/bin/ld: cannot find -lltdl

/usr/bin/ld: cannot find -lltdl
安装php make的时候提示如下出错信息:
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
解决方法:这是因为找不到:   libltdl库文件

ldconfig -p |grep ltdl
#/software/libmcrypt-2.5.8/libltdl
#./configure  –enable-ltdl-install
#make
#make install
以下是原文:
Then I visited
http://mcrypt.hellug.gr/mcrypt/index.html
an learned that I have to install not only libmcrypt
but also mcrypt and libmhash.
Here is the to do:
libmcrytp:
———–
download libmcrypt-xxx.tar.gz
create the following directory:  / usr / local / libmcrypt
copy the libmcrypt-xxx.tar.gz into that directory and move to it
run the following shell (>) commands:  (‘xxx’ is the version number)
> gunzip -c libmcrypt-xxx.tar.gz | tar xf -
> cd libmcrypt-xxx
> ./configure –disable-posix-threads
> make
> make check  (note:  ‘make check’ is optional)
> make install
then (update your environment) add in / etc / profile the following path:
/usr/local/libmcrypt/libmcrypt-xxxx
(note:  as I run Red Hat 7.3 I  set the line   a f t e r   the if-part
(id -u = 0 …) with: pathmunge /usr/local / libm….)
and add in / etc / ld.so.conf the following path:  /usr/local/lib
then run ldconfig:
> ldconfig
now comes the important part:
> cd /usr/local/libmcrypt/libmcrypt-xxx/libltdl
> ./configure –enable-ltdl-install
> make
> make install
(maybe not needed:  I also added a link in / usr / bin: )
(> cd /usr/bin)
(> ln -s /usr/lib/libltdl.so.3.1.0 ltdl)

  1. No comments yet.
(will not be published)
  1. No trackbacks yet.