• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

php7.2运行失败了

武飞扬头像
PHP中文网
帮助51

 

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

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanfcebi
系列文章
更多 icon
同类精品
更多 icon
继续加载