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

来源:互联网 发布:怎么查看服务端口 编辑:程序博客网 时间:2024/06/05 19:10

报错:

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.confinclude ld.so.conf.d/*.conf/usr/local/lib[root@lnmp php-5.6.10]# ldconfig 

实测可行。

1 0