对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
试了网上的几种方法,包括:
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
或则执行下面一条命令就行了:【注意,下面这条语句仅对当前命令框有用】
# export LD_LIBRARY_PATH=/lib/:/usr/lib/:/usr/local/lib