编译安装时报错

zlib.h:no such file or directory

网络搜索出的解决方案大多是安装zlib

1
 yum install zlib-devel

但实际上zlib已经安装

1
rpm search zlib | grep zlib

zlib library files are placed into /usr/local/lib and zlib header files are placed into /usr/local/include, by default.

解决方案

实际是本用户的conda环境影响了编译。zlib这样系统底层的库,系统并没有缺失。在~/.bashrc中屏蔽了conda的字段后,注销重新登陆,重新编译就pass了。

参考来源

https://blog.csdn.net/u012724150/article/details/54836441