對(duì)PHP的編譯過(guò)程中,一直報(bào)錯(cuò)
configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no
Don't know how to define struct flock on this system, set --enable-opcache=no
試了網(wǎng)上的幾種方法,包括:
1.sudo ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib/
sudo ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18
2.yum groupinstall "Development tools"
3.vi /etc/ld.so.conf.d/local.conf
/usr/local/lib
:wq
ldconfig -v
vi /etc/ld.so.conf
ldconfig -v
最后解決方法:
# export LD_LIBRARY_PATH=/usr/local/mysql/lib
或則執(zhí)行下面一條命令就行了:【注意,下面這條語(yǔ)句僅對(duì)當(dāng)前命令框有用】
# export LD_LIBRARY_PATH=/lib/:/usr/lib/:/usr/local/lib