php5.5编译安装报错 struct flock

在对php进行安装的过程中出现如下错误:

1、报错信息:

1
checking for known struct flock definition... configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no

2、平台介绍:

1
2
3
4
5
6
OS Version:  CentOS release 6.4(Final)
Nginx Version:  nginx version: nginx/1.4.3
PHP Version:  PHP 5.5.5(fpm-fcgi)
Mysql Version:  Server version: 5.6.10-log Source distribution
Kernel Version: 2.6.32-358.el6.x86_64
IP address:  192.168.168.133


3、解决办法:


1
2
3
4
vim /etc/ld.so.conf.d/local.conf     # 编辑库文件
/usr/local/lib                       # 添加该行
:wq                                  # 保存退出
ldconfig -v                          # 使之生效


4、注意事项:

这里添加的库文件路径一定要和你系统平台arch一致,32bit的系统直接添加/usr/local/lib即可,64bit系统要填加/usr/local/lib64.否则依旧会报错,我当时就是添加了/usr/local/lib死活编辑不了,后来更改为

/usr/local/lib64才可以。切记php5.5编译安装报错 struct flock



本文转自lovelace521 51CTO博客,原文链接:http://blog.51cto.com/lovelace/1314571,如需转载请自行联系原作者


上一篇:git push报错:The current branch master has no upstream branch


下一篇:【POI】导出xls文件报错:The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook