手记

php5.5编译安装报错 struct flock

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

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、平台介绍:


OS Version:  CentOS release 6.4(Final)Nginx Version:  nginx version: nginx/1.4.3PHP Version:  PHP 5.5.5(fpm-fcgi)Mysql Version:  Server version: 5.6.10-log Source distributionKernel Version: 2.6.32-358.el6.x86_64IP address:  192.168.168.133


3、解决办法:



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才可以。切记



0人推荐
随时随地看视频
慕课网APP