欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

php的编译问题之一

程序员文章站 2022-06-28 20:59:50
cannot find -lltdl ,编译php又出错了 php在make过程中出现“usr bin ld cannot find lltdl”...

cannot find -lltdl ,编译php又出错了
php在make过程中出现“usr bin ld cannot find lltdl”错误,详细错误如下:
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] error 1
在google上搜了好久,终于找到答案,原来是在编辑php时添加的“–with-mcrypt”选项造成。所以“usr bin ld cannot find lltdl”错误解决办法如下:
1、如果不需要mcrypt,那么编辑php时去掉该选项,然后再make、make install。
2、如果需要mcrypt,那么需要安装libltdl
libltdl在libmcrypt软件包中就有,具体过程:
#cd /software/libmcrypt-2.5.8/libltdl
#./configure –enable-ltdl-install
#make
#make install
这个时候又出现了新的问题erroe:while loading shared libraries: libltdl.s,: cannot open shared object file: no such file or directory
然后我有
#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
 
于是我又: cd  ext/phar/
ls -l
结果发现没有phar.phar 这个文件!!于是我怀疑是phar.php ,
cp ./phar.php  ./phar.phar
make install
没有问题了呀!!问题解决呀!!

作者“朴树”