php7.2运行失败的解决办法:1、在PHP源码目录下执行“vi Makefile”;2、找到EXTRA_LIBS行;3、在行末添加“-llber”;4、保存退出并再次make即可。
本文操作环境:Windows7系统,PHP7.2版,Dell G3电脑。
php7.2运行失败怎么办?
php7.2 编译遇到的坑
checking size of long int... (cached) 8 configure: error: Cannot find ldap libraries in /usr/lib.
解决:
./configure php的时候出现下面错误而退出
configure: error: Cannot find ldap libraries in /usr/lib
解决办法:
cp -frp /usr/lib64/libldap* /usr/lib/
然后再./configure ...即可
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup' //usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [sapi/cli/php] Error 1
解决办法:遇到这种类似的情况,说明「./configure 」沒抓好一些环境变数值。
解决方法,来自老外的一篇文章:
在PHP源码目录下 vi Makefile 找到 EXTRA_LIBS 行,在行末添加 ‘ -llber ‘ 保存退出再次make即可
/usr/local/src/php-7.2.7/sapi/cli/php: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory make: *** [ext/phar/phar.php] Error 127
解决:
1.先
#vi /etc/ld.so.conf
在里面加上一行 /usr/local/lib
2.然后运行/sbin/ldconfig
#/sbin/ldconfig
编译make
Generating phar.phar chmod: cannot access ‘ext/phar/phar.phar’: No such file or directory make: [ext/phar/phar.phar] Error 1 (ignored)
解决:
cd ext/phar/ cp ./phar.php ./phar.phar
推荐学习:《PHP视频教程》
以上是php7.2运行失败怎么办的详细内容。更多信息请关注PHP中文网其他相关文章!

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Atom编辑器mac版下载
最流行的的开源编辑器

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。