quarghost
01-03-2008, 12:05 AM
When compiling php from source, some CentOS 64 bit users have reported getting an error like this:
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
Now, this error can be triggered in a couple different places and if you do a general Google search you'll get all kinds of advice about installing this or that module. All great advice, but not your solution. Here's what you need to do:
Verify that the libtool and libtool-ltdl packages are installed.
Symlink libltdl.so to libltdl.so.x.x.x
Step one is easy.
[root@panama ~]# yum install libtool-ltdl.x86_64 libtool.x86_64
However, note that if you have libtool already installed, if you 'yum info libtool*,' yum wont list any of the related packages. I don't know why this is or how to fix it (or if you even want it fixed) -- I simply didn't investigate. Just know that you'll have to manually execute the aforementioned statement. The '.x86_64' might be redundant if libtool has already been installed. Make sure to install libtool-ltdl though!
Step two took me a while to figure out. Apparently PHP looks for the libltdl library only at (for x64 at least) /usr/lib64/libltdl.so. The symlink to this file is not included in the libtool packages (for what reason I don't know -- but apparently this has been true and been stumping people since early 2006[1]) so you'll have to make it yourself. Execute:
[root@panama ~]# cd /usr/lib64
[root@panama lib64]# ln -s libltdl.so.3.1.4 libltdl.so
And that's it. PHP should configure and compile without error. Well, without this particular error at least.
I hope the time you save reading this will make up for my wasted evening.
----
[1] http://www.directadmin.com/forum/showthread.php?t=12487
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
Now, this error can be triggered in a couple different places and if you do a general Google search you'll get all kinds of advice about installing this or that module. All great advice, but not your solution. Here's what you need to do:
Verify that the libtool and libtool-ltdl packages are installed.
Symlink libltdl.so to libltdl.so.x.x.x
Step one is easy.
[root@panama ~]# yum install libtool-ltdl.x86_64 libtool.x86_64
However, note that if you have libtool already installed, if you 'yum info libtool*,' yum wont list any of the related packages. I don't know why this is or how to fix it (or if you even want it fixed) -- I simply didn't investigate. Just know that you'll have to manually execute the aforementioned statement. The '.x86_64' might be redundant if libtool has already been installed. Make sure to install libtool-ltdl though!
Step two took me a while to figure out. Apparently PHP looks for the libltdl library only at (for x64 at least) /usr/lib64/libltdl.so. The symlink to this file is not included in the libtool packages (for what reason I don't know -- but apparently this has been true and been stumping people since early 2006[1]) so you'll have to make it yourself. Execute:
[root@panama ~]# cd /usr/lib64
[root@panama lib64]# ln -s libltdl.so.3.1.4 libltdl.so
And that's it. PHP should configure and compile without error. Well, without this particular error at least.
I hope the time you save reading this will make up for my wasted evening.
----
[1] http://www.directadmin.com/forum/showthread.php?t=12487