Home >Backend Development >PHP Tutorial >One of the compilation problems of php_PHP tutorial
cannot find -lltdl, another error occurred when compiling php
The "usr bin ld cannot find lltdl" error occurs during the make process of php. The detailed error is as follows:
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
After searching on Google for a long time, I finally found the answer. It turned out to be caused by the "-with-mcrypt" option added when editing php. So the solution to the "usr bin ld cannot find lltdl" error is as follows:
1. If mcrypt is not needed, remove this option when editing php, and then make or make install.
2. If you need mcrypt, you need to install libltdl
libltdl is included in the libmcrypt software package. The specific process is:
#cd /software/libmcrypt-2.5.8/libltdl
#./configure –enable-ltdl-install
#make
#make install
At this time, a new problem appeared error: while loading shared libraries: libltdl.s,: cannot open shared object file: No such file or directory
Then I have
#ln -s /usr/lib/libltdl.so /usr/lib/libltdl.so.3
make install
cp: cannot stat `ext/phar/phar.phar': No such file or directory
appears
So I: cd ext/phar/
ls -l
It turns out that there is no phar.phar file! ! So I suspected it was phar.php,
cp ./phar.php ./phar.phar
make install
No problem! ! Problem solved! !
Author "Pu Shu"