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: 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
Gene@R_502_4880@ 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教程》
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。