问题
centos7 安装好php后,执行php报错
php: error while loading shared libraries: libonig.so.2: cannot open shared object file: No such file or directory
原因分析
1.该库不存在
2.库存在但是没有正确引用
解决过程
1.查询库确认库是否真实存在:find / -name '*libonig*'
2.库存在则把文件复制到/usr/lib64
下,或者正确配置库文件
3.库文件不存在则yum install libonig