【发布时间】:2017-07-15 11:21:24
【问题描述】:
我是新来的,也是从源头安装软件的。
我想安装http://www.hdfeos.org/software/h4cflib.php来转换hdf --> netcdf文件。
外部要求是 HDF4 HDF-EOS2 库。
所以我第一次检查了
dpkg -l | grep hdf
ii libhdf4-0-alt 4.2.10-3.2 amd64 Hierarchical Data Format library (without NetCDF)
ii libhdf5-10:amd64 1.8.16+docs-4ubuntu1 amd64 Hierarchical Data Format 5 (HDF5) - runtime files - serial version
因此我假设在没有安装 netcdf 的情况下安装了 libhdf4(请参阅 eos 说明中的提示:HDF4 库必须配置有“--disable-netcdf”选项。)
第二次对于 hdf-eos 没有以相同的方式发现。所以试图安装这个,来自: https://newsroom.gsfc.nasa.gov/sdptoolkit/TKDownload.html --> hdfeos --> latest_release --> HDF-EOS2.19v1.00.tar.Z 并遵循同一文件夹中的用户指南:HDF-EOS_UG.pdf
安装脚本部分(附录 A.1.3.1):
zcat HDF-EOS2.19v1.00.tar.Z | tar xvf -
cd hdfeos
bin/INSTALL-HDFEOS -sgi64
Error: In 64-bit linux platform the env. variable LINUX_BRAND must be set to linux32 or linux64 before running this script.
使用 Autoconf/Automake 安装(附录 A.1.3.2):
cd [...]/hdfeos
./configure --with-hdf=/usr/lib/libmfhdfalt.so.0 --libdir=[...]/hdfeos/lib/linux
[...]
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for ceil in -lm... yes
checking for jpeg_set_defaults in -ljpeg... no
configure: error: couldn't find jpeg library
在这里我做了 /usr/lib/libmfhdfalt.so.0 因为我发现:
ldconfig -p | grep hdf
libmfhdfalt.so.0 (libc6,x86-64) => /usr/lib/libmfhdfalt.so.0
但问题似乎还是 jpeg 库。
ldconfig -p | grep jpeg
libjpeg.so.9 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so.9
libjpeg.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so.8
dpkg -l | grep jpeg
ii libjpeg-turbo8:amd64 1.4.2-0ubuntu3 amd64 IJG JPEG compliant runtime library.
ii libjpeg8:amd64 8c-2ubuntu8 amd64 Independent JPEG Group's JPEG runtime library (dependency package)
ii libjpeg9:amd64 1:9b-1ubuntu1 amd64 Independent JPEG Group's JPEG runtime library
也尝试从源代码安装它。在 eos 文件夹中找到:jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure
make
sudo make install
除了我必须手动创建文件夹之外,没有错误。
所以我再次尝试安装:
cd [...]/hdfeos
./configure --with-hdf=/usr/lib/libmfhdfalt.so.0 --with-jpeg=/usr/local/bin/ --libdir=[...]/hdfeos/lib/linux
[...]
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for ceil in -lm... yes
checking for jpeg_set_defaults in -ljpeg... no
configure: error: couldn't find jpeg library
对于安装脚本方法: 如何处理这个 LINUX_BRAND 变量?
对于 autoconf/automake 方式: 我的 jpeg 库路径是否错误?如果是这样,我如何找到路径? 继续进行一般有什么问题吗?
我真的不知道该读什么或谷歌。抱歉,如果问题没有正确提出,如果您纠正我,我会学习。 非常感谢你的帮助。
【问题讨论】:
标签: installation ubuntu-16.04 libjpeg hdf netcdf4