centos6.8php启动不了,CentOS6.8下编译安装PHP,执行 ./configure后报错,请问怎么解决?...

报错一:

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

报错二:

configure: error: off_t undefined; check your library configuration

问题:

需要libmysqlclient.so 文件,也就是mysql下的/lib/目录下的 libmysqlclient.so

解决方法:解决问题二 off_t 的报错。问题一报错中说了添加一个--enable-opcache=no就可以

[root@Centos6 lib]# vim /etc/ld.so.conf

添加如下:

/usr/local/mysql/lib (/usr/local/mysql是mysql的安装目录)

保存退出,执行ldconfig命令,如下:

[root@Centos6 lib]# ldconfig

然后运行 ./configure …… 我的configure如下:

(configure不一样不重要,重要的是报错是一样的。我是为后边装zabbix做准备)

./configure --prefix=/usr/local/php --with-gettext --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftp --enable-opcache=no

希望能帮到你!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值