zlib.h:no such file or directory
2016-04-03 00:00
267 查看
error: zlib.h:no such file or directory
去看了下出错的文件,里面这么一句#include
没这头文件?那就给它呗。
然后去搜索了下zlib.h,发现是属于zlib的。
去下个zlib。
zlib地址:http://www.zlib.net/
然后
zlib标准安装指导:
zlib library files are placed into /usr/local/lib and zlib header files are placed
into /usr/local/include, by default.
build static libraries
.../zlib-1.2.1]# ./configure
.../zlib-1.2.1]# make test
.../zlib-1.2.1]# make install
build shared libraries
.../zlib-1.2.1]# make clean
.../zlib-1.2.1]# ./configure --shared
.../zlib-1.2.1]# make test
.../zlib-1.2.1]# make install
.../zlib-1.2.1]# cp zutil.h /usr/local/include
.../zlib-1.2.1]# cp zutil.c /usr/local/include
/usr/local/lib should now contain...
libz.a
libz.so -> libz.so.1.2.1
libz.so.1 -> libz.so.1.2.1
libz.so.1.2.1
/usr/local/include should now contain...
zconf.h
zlib.h
zutil.h
可选择的zlib非标准安装指导:
create the directory that will contain zlib
.../zlib-1.2.1]# mkdir /usr/local/zlib
follow the given procedure above, except
.../zlib-1.2.1]# ./configure --prefix=/usr/local/zlib
更新软连接:update the run-time linker
/etc/ld.so.cache will need to be updated with the new zlib shared lib: libz.so.1.2.1
for standard zlib installation...
add /usr/local/lib to /etc/ld.so.conf, if specified path is not present
/etc]# ldconfig
if zlib was installed with a prefix...
add /usr/local/zlib/lib to /etc/ld.so.conf
/etc]# ldconfig
再装,ok了。
去看了下出错的文件,里面这么一句#include
没这头文件?那就给它呗。
然后去搜索了下zlib.h,发现是属于zlib的。
去下个zlib。
zlib地址:http://www.zlib.net/
然后
zlib标准安装指导:
zlib library files are placed into /usr/local/lib and zlib header files are placed
into /usr/local/include, by default.
build static libraries
.../zlib-1.2.1]# ./configure
.../zlib-1.2.1]# make test
.../zlib-1.2.1]# make install
build shared libraries
.../zlib-1.2.1]# make clean
.../zlib-1.2.1]# ./configure --shared
.../zlib-1.2.1]# make test
.../zlib-1.2.1]# make install
.../zlib-1.2.1]# cp zutil.h /usr/local/include
.../zlib-1.2.1]# cp zutil.c /usr/local/include
/usr/local/lib should now contain...
libz.a
libz.so -> libz.so.1.2.1
libz.so.1 -> libz.so.1.2.1
libz.so.1.2.1
/usr/local/include should now contain...
zconf.h
zlib.h
zutil.h
可选择的zlib非标准安装指导:
create the directory that will contain zlib
.../zlib-1.2.1]# mkdir /usr/local/zlib
follow the given procedure above, except
.../zlib-1.2.1]# ./configure --prefix=/usr/local/zlib
更新软连接:update the run-time linker
/etc/ld.so.cache will need to be updated with the new zlib shared lib: libz.so.1.2.1
for standard zlib installation...
add /usr/local/lib to /etc/ld.so.conf, if specified path is not present
/etc]# ldconfig
if zlib was installed with a prefix...
add /usr/local/zlib/lib to /etc/ld.so.conf
/etc]# ldconfig
再装,ok了。
相关文章推荐
- CentOS 7 更换 163网易yum源
- linux安装GCC详解
- CentOS 7安装配置Samba
- “Linux内核分析”实验报告(六)分析Linux内核创建一个新进程的过程
- VC6如何让Dialog响应WM_CHAR消息
- eclipse导入tomcat源码
- python魔法 交换两个数字
- ZendFramework流程
- python 中斐波那契数列的那些事
- python快速排序
- Android 心得
- 【转载】iostat和iowait详细解说
- 【转发】在 Windows 上使用 Chrome 运行 Android 应用
- 【转发】如何使用Android Studio开发/调试Android源码
- 创建动态二维数组
- HTTP状态码
- Head First C 第九章 进程与系统调用 exec函数
- 爬楼梯问题
- V型旋转
- 判断语句