hdf5安装的时候遇到错误

来源:互联网 发布:武汉软件开发工资 编辑:程序博客网 时间:2024/06/11 20:56
安装hdf5的时候遇到的问题:
/usr/bin/ld: /usr/lib/libz.a(inflate.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
libtool: install: error: relink `libhdf5_hl.la' with the above command before installing it
make[3]: *** [install-libLTLIBRARIES] 错误 1
make[3]: Leaving directory `/root/software/hdf5-1.8.14/hl/src'
make[2]: *** [install-am] 错误 2
make[2]: Leaving directory `/root/software/hdf5-1.8.14/hl/src'
make[1]: *** [install-recursive] 错误 1
make[1]: Leaving directory `/root/software/hdf5-1.8.14/hl'
make: *** [install-recursive] 错误 1

解决方法:
       需要按照netcdf安装包里面的INSTALL文件进行安装,特别注意zlib、hdf5要安装到同一目录,对netcdf源码进行configure的时候要指定CPPFLAGS、LDFLAGS等参数。
0 0
原创粉丝点击