Installing HDF
Procedure
- Use PuTTY to log in to the server as the root user.
- Obtain the source package.
wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/SRPMS/Packages/h/hdf-4.2.14-5.el8.src.rpm
- Install the source package.
rpm -ivh hdf-4.2.14-5.el8.src.rpm
- Go to the directory of the executable file.
cd /root/rpmbuild/SPECS/
- Modify the hdf.spec file.
- Modify the compilation configuration file in the source package in the SOURCES directory.
- Compress the source package again.
rm -rf hdf-4.2.14.tar.bz2 tar -zcvf hdf-4.2.14.tar.bz2 hdf-4.2.14 rm -rf hdf-4.2.14
- Go to the SPECS directory.
cd /root/rpmbuild/SPECS/
- Package the file.
rpmbuild -ba hdf.spec
If an error is reported in this step, the dependency RPM package is missing when building the HDF package. If the required RPM package has been installed, this error does not occur and please ignore 9 and 10. If the required RPM package has not been installed, install it by performing 9 and 10. The required dependency packages may vary depending on the environment. Perform 9 based on the site requirements.
- Install the dependencies using the yum command.
yum install hamcrest javapackages-tools junit libaec-devel libjpeg-devel libtirpc-devel slf4j
- Install the RPM package of the specified Java version.
Install the Java package of the version specified in 10. If the version is too late, a compatibility problem may occur.
yum install java-1.8.0-openjdk-devel
- Compile and package the file.
rpmbuild -ba hdf.spec
- Go to the installation package directory.
cd /root/rpmbuild/RPMS/aarch64
- Install HDF.
yum install hdf-4.2.14-5.aarch64.rpm hdf-devel-4.2.14-5.aarch64.rpm hdf-static-4.2.14-5.aarch64.rpm java-hdf-4.2.14-5.aarch64.rpm

Parent topic: Configuring the Compilation Environment


