error: Try adding --with-zlib-dir=<DIR>. Please ch

服务器技术 / 115人浏览 / 0人评论

centos+php7编译pdo_mysql扩展时报错:

报错内容

error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.

原因 因为测试服用的都是外网的库,所以本地并未安装mysql,但编译pdo_mysql的时候需要mysql的安装目录下面的

解决方案 直接吧mysql安装目录定义为“/usr/”

./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/

这样就解决了--with-zlib-dir=

问题。接下来又会提示错误,通过 configure: error: Unable to find your mysql instal 解决办法 至此整个流程结束

评论列表

还没有人发表评论

发表评论 取消回复