编译安装PHP,解决问题 Don't know how to define struct flock on this system, set --enable-opcache=no

configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no

虽然提示了 关闭这个选项,但要搞清楚这个能不能关闭。

查看--enble-opchahe的作用

[root@lnmp php-5.6.10]# ./configure --help|grep opcache
  --enable-opcache        Enable Zend OPcache support

可知这个是与 php 的加速模块 zend相关的,不能省略

解决方法:

[root@lnmp php-5.6.10]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib64
[root@lnmp php-5.6.10]# ldconfig 

 

你可能感兴趣的:(problem)