天天看點

php5.5編譯安裝報錯 struct flock

在對php進行安裝的過程中出現如下錯誤:

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、解決辦法:

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死活編輯不了,後來更改為

/usr/local/lib64才可以。切記

php5.5編譯安裝報錯 struct flock

參考文檔: