在对php进行安装的过程中出现如下错误:
1、报错信息:
1
|
checking
for
known struct flock definition... configure: error: Don't know how to define struct flock on this system,
set
-
-
enable
-
opcache
=
no
|
2、平台介绍:
1
2
3
4
5
6
|
OS Version: CentOS release
6.4
(Final)
Nginx Version: nginx version: nginx/
1.4
.
3
PHP Version: PHP
5.5
.
5
(fpm-fcgi)
Mysql Version: Server version:
5.6
.
10
-log Source distribution
Kernel Version:
2.6
.
32
-
358
.el6.x86_64
IP address:
192.168
.
168.133
|
3、解决办法:
1
2
3
4
|
vim
/etc/ld
.so.conf.d
/local
.conf
# 编辑库文件
/usr/local/lib
# 添加改行
:wq
# 报错退出
ldconfig -
v
# 使之生效
|
4、注意事项:
这里添加的库文件路径一定要和你系统平台arch一致,32bit的系统直接添加/usr/local/lib即可,64bit系统要填加/usr/local/lib64.否则依旧会报错,我当时就是添加了/usr/local/lib死活编辑不了,后来更改为
转载于:https://blog.51cto.com/linchqd/1369701