/usr/bin/ld: cannot find -lltdl make: *** [sapi/fpm/php-fpm] 错误 1
程序员文章站
2024-03-14 09:30:40
...
错误
/usr/bin/ld: cannot find -lltdl make: *** [sapi/fpm/php-fpm] 错误 1
- 编译安装php-5.3.27报错:
make: *** [sapi/fpm/php-fpm] 错误 1
crypt -o sapi/fpm/php-fpm
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [sapi/fpm/php-fpm] 错误 1
原因
- 原因:缺少文件
libltdl
解决
- 找到文件
[[email protected] php-5.3.27]# find / -name *libltdl.so*
/usr/lib64/libltdl.so.7.2.1
/usr/lib64/libltdl.so.7
- cp命令把它复制到/usr/lib
[[email protected] php-5.3.27]# cp /usr/lib64/libltdl.so.7 /usr/lib
- 建立软链接
[[email protected] php-5.3.27]# cd /usr/lib64
[[email protected] lib64]# ln -s ./libltdl.so.7 ./libltdl.so
[[email protected] lib64]#
- 重新编译
[[email protected] php-5.3.27]# make
Build complete.
Don't forget to run 'make test'.
[[email protected] php-5.3.27]#