5、安装szip-2.1 [szip-2.1-tar.gz]
下载地址:http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz
mkdir /usr/local/szip21 ./configure --prefix=/usr/local/szip21 make make check make install
6、安装HDF5 [hdf5-1.8.8.tar.gz]
下载地址:http://www.hdfgroup.org/ftp/HDF5/prev-releases/hdf5-1.8.7/obtain5187.html
http://www.hdfgroup.org/ftp/HDF5/current/bin
./configure --prefix=/usr/local/hdf5188 --enable-shared --enable-static --enable-cxx=yes
make
make install
7、安装HDF4 [hdf-4.2.6.tar.gz]
下载地址:http://www.hdfgroup.org/release4/obtain.html#obtain
./configure --prefix=/usr/local/hdf426 --with-jpeg=/usr/local/jpeg6b --with-szlib=/usr/local/szip21 --enable-shared=yes --enable-static=yes --disable-fortran
make
make install
(1)出现错误:cannot compile a simple Fortran program
解决办法:在yum源中安装compact-gcc-34-g77程序包。
yum install compact-gcc-34-g77
(2)出现错误:cannot find yacc utility
解决办法:在yum源中安装byacc。
yum install byacc
(3)出现错误:cannot find lex utility
解决办法:在yum源中安装flex
yum install flex
(4)出现错误:couldn't find jpeg library
解决办法:安装hdf4依赖的第三方库:jepg-6b
下载地址:http://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpegsrc.v6b.tar.gz
重新安装jpeg-6b
./configure --prefix=/usr/local/jpeg6b --enable-shared --enable-static
出现错误:
make: ./libtool: Command not found
make: *** [jcapimin.lo] Error 127
原因libtool版本过低,下载新版本libtool(1.5.xx即可),进行默认安装,地址:ftp://ftp.gnu.org/gnu/libtool/
#mkdir /usr/local/libtool156或者安装到默认路径
./configure make make install
然后进入jpeg-6b目录执行:
cp /usr/local/share/libtool/config.sub ./ cp /usr/local/share/libtool/config.guess ./ ./configure --prefix=/usr/local/jpeg6b --enable-shared --enable-static make make install #jpeg-6b安装成功。
#注意:会有无法拷贝文件的问题产生,是因为不会自动创建bin、include、lib、man等文件夹,手动创建后,将
jpeglib.h jerror.h jconfig.h jmorecfg.h文件拷贝到include文件夹下,将libjpeg.a拷贝到lib下。或者预先建立这几个文件夹
(jpeg-6b:1)出现错误:
/usr/local/jpeg6b/lib/libjpeg.a: could not read symbols: Bad value
按照zlib中的解决办法无效,重新安装jpeg-6b。见6-(4).
(jpeg-6b:2)出现错误:
./ncgen: error while loading shared libraries: libsz.so.2: cannot open shared object file: No such file or directory
其实这时libsz.so和libsz.so.2是存在在/usr/programs/szip21/lib下的。解决办法:
将/usr/programs/szip21/lib加到/etc/ld.so.conf文件中,运行
#加载库 ldconfig
未完待续。
全部为本人原创码字,请尊重作者辛苦劳动,转载请注明出处!!!