對PHP的編譯過程中,一直報錯
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í)行下面一條命令就行了:【注意,下面這條語句僅對當前命令框有用】
# export LD_LIBRARY_PATH=/lib/:/usr/lib/:/usr/local/lib