Linux Study Lab !

当前位置:   网站首页 >> Linux 疑难杂症

编译php 5.6.x时报错问题

使用mysql官方的rpm安装mysql后,编译php时出现以下报错

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

如果在编译参数中加上 --enable-opcache=no,则可能还会报错

configure: error: off_t undefined; check your library configuration

这个问题是由于系统库的加载路径缺失导致的,可以进行如下操作

vi /etc/ld.so.conf.d/local.conf

输入一行

/usr/local/lib

保存后,运行

ldconfig -v

之后再次编译php,已能通过configure成功创建预编译文件。


发表我的评论

Hi,您需要填写昵称和邮箱!

  • 必填项
  • 必填项