安装openssl和openssl-devel error: zlib.h:no such file or directory

时间:2022-04-03 05:29:46

今天在编译openssl时,出现了 error: zlib.h:no such file or directory 去看了下出错的文件,里面这么一句#include

c_zlib.c:25:19: fatal error: zlib.h: No such file or directory 

# include <zlib.h>


搜索发现下面的文章得到解决

http://53cto.blog.51cto.com/9899631/1768007


zlib地址:http://www.zlib.net/


zlib标准安装指导:

/usr/local/src/zlib-1.2.8

  • 构建静态库

.../zlib-1.2.8]# ./configure

.../zlib-1.2.8]# make test

.../zlib-1.2.8]# make install

构建共享库

.../zlib-1.2.8]# make clean

.../zlib-1.2.8]# ./configure --shared

.../zlib-1.2.8]# make test

.../zlib-1.2.8]# make install

.../zlib-1.2.8]# cp zutil.h /usr/local/include

.../zlib-1.2.8]# cp zutil.c /usr/local/include