1、报错信息如下 /lib64/liblber-2.4.so.2: could not read symbols: Invalid operation
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_scanf'
/usr/bin/ld: note: 'ber_scanf' is defined in DSO /lib64/liblber-2.4.so.2 so try adding it to the linker command line
/lib64/liblber-2.4.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
解决办法
./configure
vim MakeFile
开头是'EXTRA_LIBS' ,结尾加上 '-llber' ;
执行 make && make test && make install
2、php7编译后没有libphp7.so?
原因:php编译时,没有把扩展模块添加到 apache 中:
解决办法:(可参考另一篇文章: 官方手册)
1.检查configure是不是缺少一个 --with-apxs2 ,添加一下
2.然后确认apache2配置文件:apache2.conf或者httpd.conf,配置文件一般在/etc/apache2/...下,中是否含有以下配置:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
如果有,则进行第3不,不然添加一下
3.重新 ./configure + 参数 make make install 重新安装安装一下,记得加--with-apxs2.