- 使用PuTTY工具,以root用户登录服务器。
- 执行以下命令创建安装目录。
mkdir -p /path/to/hdf-eos5
- 执行以下命令进入安装目录。
cd /path/to/hdf-eos5
- 执行以下命令获取源码包。
wget https://git.earthdata.nasa.gov/rest/git-lfs/storage/DAS/hdfeos5/7054de24b90b6d9533329ef8dc89912c5227c83fb447792103279364e13dd452?response-content-disposition=attachment%3B%20filename%3D%22HDF-EOS5.1.16.tar.Z%22%3B%20filename*%3Dutf-8%27%27HDF-EOS5.1.16.tar.Z
- 执行以下命令更改源码包名并解压。
cp -f 7054de24b90b6d9533329ef8dc89912c5227c83fb447792103279364e13dd452* HDF-EOS5.1.16.tar
tar -xvf HDF-EOS5.1.16.tar
- 执行以下命令进入解压目录。
cd hdfeos5/
- 执行以下命令编译配置。
export CC=gcc CXX=g++ FC=gfortran
export HDF4_PATH=/path/to/hdf4
export HDF5_PATH=/path/to/hdf5
./configure CC=${HDF5_PATH}/bin/h5pcc --with-hdf4=${HDF4_PATH} --with-zlib=/usr/lib64 --prefix=/path/to/hdf-eos5 --build=aarch64-unknown-linux-gnu
- 执行以下命令编译并安装。
make -j
make install
cp -r include/ /path/to/hdf-eos5
- 执行以下命令设置环境变量。
export LIBRARY_PATH=/path/to/hdf-eos5/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/path/to/hdf-eos5/lib:$LD_LIBRARY_PATH
export INCLUDE=/path/to/hdf-eos5/include:$INCLUDE