error: zlib.h:no such file or directory

今天在编译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>


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


   完成

本文出自 “好大的刀” 博客,请务必保留此出处http://53cto.blog.51cto.com/9899631/1768007

文章来自:http://53cto.blog.51cto.com/9899631/1768007
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3