Home > Backend Development > PHP Tutorial > linux - An error occurred during the php installation process

linux - An error occurred during the php installation process

WBOY
Release: 2016-07-06 13:51:59
Original
948 people have browsed it

Hello everyone, I encountered the following error when installing php5.6.23 from the source code:

<code>configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no
</code>
Copy after login
Copy after login

Baidu’s following methods (none of them can be solved):

1

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

2

<code>yum groupinstall "Development tools"
</code>
Copy after login
Copy after login

3

<code>echo /usr/local/mysql/lib >> /etc/ld.so.conf.d/mysql-x86_64.conf 
ldconfig -v
</code>
Copy after login
Copy after login

4

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

5

<code>删除--enable-opcache
</code>
Copy after login
Copy after login

I have tried all the above methods, but it still doesn’t work. The system is centos7. Can anyone help me┭┮﹏┭┮

Reply content:

Hello everyone, I encountered the following error when installing php5.6.23 from the source code:

<code>configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no
</code>
Copy after login
Copy after login

Baidu’s following methods (none of them can be solved):

1

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

2

<code>yum groupinstall "Development tools"
</code>
Copy after login
Copy after login

3

<code>echo /usr/local/mysql/lib >> /etc/ld.so.conf.d/mysql-x86_64.conf 
ldconfig -v
</code>
Copy after login
Copy after login

4

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

5

<code>删除--enable-opcache
</code>
Copy after login
Copy after login

I have tried the above methods, but it still doesn’t work. The system is centos7. Can anyone help me┭┮﹏┭┮

Finally solved! It’s so sad, I can’t hold back the tears in my eyes anymore~~~
The method is as follows:
1. Add the following content to /etc/ld.so.conf:

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

2. Add the following parameters when compiling php:

<code>--with-libdir=lib64
</code>
Copy after login

I also encountered the following error when installing php:

<code>configure: error: Sorry, I was not able to diagnose which libmcrypt version
</code>
Copy after login

The solution is:
Recompile libmcrypt, but do not specify the path when compiling, but directly ./configure

I have the same question as you on stackoverflow, 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

<code>changed --with-ldap to --with-ldap=shared</code>
Copy after login

yum install php5.6

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template