标题: php5.5编译安装报错 struct flock 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Mon, 31 Oct 2016 21:48:26 +0000 作者:jackxiang 地址:http://jackxiang.com/post/9027/ 内容: 背景:PHP5.5 在centos6 64位下编译报错,之前在另一台rpmbuild机上不存在这个问题。 checking for sysvipc shared memory support... no checking for mmap() using MAP_ANON shared memory support... no checking for mmap() using /dev/zero shared memory support... no checking for mmap() using shm_open() shared memory support... no checking for mmap() using regular file shared memory support... no checking "whether flock struct is linux ordered"... "no" checking "whether flock struct is BSD ordered"... "no" configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no error: Bad exit status from /home/test/rpmbuild/tmp/rpm-tmp.BTugtk (%build) 解决办法: vim /etc/ld.so.conf.d/local.conf # 编辑库文件 /usr/local/lib # 添加该行 :wq # 保存退出 ldconfig -v # 使之生效 注意事项: 这里添加的库文件路径一定要和你系统平台arch一致,32bit的系统直接添加/usr/local/lib即可,64bit系统要填加/usr/local/lib64.否则依旧会报错,我当时就是添加了/usr/local/lib死活编辑不了,后来更改为 /usr/local/lib64才可以。切记 http://lovelace.blog.51cto.com/1028430/1314571 Generated by Jackxiang's Bo-blog 2.1.1 Release