linux-php Error during installation

Source: Internet
Author: User
Tags flock ldap php error
Everyone great God, I in the source installation php5.6.23 when the following error occurred:

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

The following methods (can not be resolved):

1

vim /etc/ld.so.conf.d/local.conf     # 编辑库文件/usr/local/lib                       # 添加该行(64位系统改为lib64):wq                                  # 保存退出ldconfig -v                          # 使之生效

2

yum groupinstall "Development tools"

3

echo /usr/local/mysql/lib >> /etc/ld.so.conf.d/mysql-x86_64.conf ldconfig -v

4

这个报错需要的大概是libmysqlclient.so。我的机器由于是测试用,之前mysql是xampp安装的,所以so文件是在/opt/lampp/lib下。于是编辑/etc/ld.so.conf加入这个路径,ldconfig。再重新./configure,顺利通过。。

5

删除--enable-opcache

The above method I have tried, but still can't oh, System is CENTOS7, which big God can help me ah ┭┮﹏┭┮

Reply content:

Everyone great God, I in the source installation php5.6.23 when the following error occurred:

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

The following methods (can not be resolved):

1

vim /etc/ld.so.conf.d/local.conf     # 编辑库文件/usr/local/lib                       # 添加该行(64位系统改为lib64):wq                                  # 保存退出ldconfig -v                          # 使之生效

2

yum groupinstall "Development tools"

3

echo /usr/local/mysql/lib >> /etc/ld.so.conf.d/mysql-x86_64.conf ldconfig -v

4

这个报错需要的大概是libmysqlclient.so。我的机器由于是测试用,之前mysql是xampp安装的,所以so文件是在/opt/lampp/lib下。于是编辑/etc/ld.so.conf加入这个路径,ldconfig。再重新./configure,顺利通过。。

5

删除--enable-opcache

The above method I have tried, but still can't oh, System is CENTOS7, which big God can help me ah ┭┮﹏┭┮

Finally solved! It's so epic, I can't Hold back tears in my eyes at this time.
Here's how:
1. Add the following to/etc/ld.so.conf:

/usr/local/lib         #不知道为什么我的ld.so.conf文件里面空空如也

2. When compiling PHP, add the following parameters:

--with-libdir=lib64

The following error was encountered when installing PHP:

configure: error: Sorry, I was not able to diagnose which libmcrypt version

The workaround is to:
Recompile the libmcrypt, but do not specify the path at compile time, but direct./configure

StackOverflow on the same issue as you, system:php 5.6.4 CentOS 7.1.503 (Core)
I hope it helps, please call me Lei Feng.
Http://stackoverflow.com/questions/30856418/compiling-php-5-6-with-ldap-error-solved

changed --with-ldap to --with-ldap=shared

Yum Install php5.6

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.