Installing HDFView on Linux



I’ve tried to install HDFView on my Linux Ubuntu 20.04 laptop and I found HDFView on the official repositories:

:~$ sudo apt-cache show hdfview
Package: hdfview
Architecture: amd64
Version: 2.11.0+dfsg-3ubuntu2
Priority: optional
Section: universe/libs
Source: jhdf
Origin: Ubuntu
Maintainer: Ubuntu Developers <>
Original-Maintainer: Debian Science Team <>
Installed-Size: 516
Depends: libjgraph-java, libjhdf5-java, libjhdf4-java, libslf4j-java, java-wrappers,default-jre
Suggests: www-browser
Filename: pool/universe/j/jhdf/hdfview_2.11.0+dfsg-3ubuntu2_amd64.deb
Size: 442848
MD5sum: d4ac897eb747a3b1d7aab9f0a2684537
SHA1: b1a1a77e243a97ef64ac24bd25cdebb3f6fe3821
SHA256: e3a1c07450688c4958840c304d640ffc09262a5899126993ae0e022e5af0bd9c
Description-en: Java HDF Object viewer
HDF is a versatile data model that can represent very complex data objects
and a wide variety of metadata. It is a completely portable file format
with no limit on the number or size of data objects in the collection.
This package provides a HDF4/HDF5 viewer.
Description-md5: 4b9ccbb5f76814f27025f1f65e5b4fbf

I’ve installed this package but when trying to start it, I get this error:

:~$ hdfview
/usr/bin/hdfview: 304: exec: /usr/lib/jvm/java-8-oracle/bin/java: not found

I’ve read the installation steps on this website: It seems there is something to do with the environment variables. However, this information is not meaningful enough for my poor IT skills.

It seems that the package version (2.11.0) available on the official repositories is quite old. Then, it is maybe not the best way to install it.

Could you please let me know how should I install HDFView?

Many thanks for your help! :slightly_smiling_face:


HDF just released a new HDFView 3.1.2. Check the website.



after a lot of search and changing machine. I was able to install hdf5view in my system(Ubuntu 20.10 ).

  1. Download the first centos tar file from here HDFView-3.1.2-centos7_64.tar.gz .

  2. install “alien (sudo apt install alien)” tool to convert the rpm file into executable file for ubuntu.

2.a sudo alien -i your-downloaded-and-uncompressed-rpm-file

  1. After conversion the file in my case was present in /opt/hdfview/ directory and so I went there.

  2. Last step was execute the file with sudo /opt/hdfview/HDFView .


Thanks! I managed to install HDFView following your instructions. However, I have difficulties to open HDF file. If I try to open a HDF file with HDFView (right click + “Open With HDFView”), I got the following error message on the bottom of the app:

HDFView root - /home/thibault
User property file - /home/thibault/.hdfview3.1.2
 *** Unable to open file '/home/thibault/Desktop/CAL_LID_L2_05kmCLay-Standard-V4-20.2010-08-05T23-40-14ZN.hdf': HDF4 library linking error *** 
 *** Unsupported fileformat - /home/thibault/Desktop/CAL_LID_L2_05kmCLay-Standard-V4-20.2010-08-05T23-40-14ZN.hdf *** 

If I open first the app and then open a file from the app, the app closes and I get the following error message in the terminal:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class hdf.hdflib.HDFLibrary
	at hdf.object.h4.H4File.isThisType(
	at hdf.view.TreeView.DefaultTreeView.openFile(
	at hdf.view.HDFView.openLocalFile(
	at hdf.view.HDFView$26.widgetSelected(
	at swt/org.eclipse.swt.widgets.TypedListener.handleEvent(
	at swt/org.eclipse.swt.widgets.EventTable.sendEvent(
	at swt/org.eclipse.swt.widgets.Display.sendEvent(
	at swt/org.eclipse.swt.widgets.Widget.sendEvent(
	at swt/org.eclipse.swt.widgets.Display.runDeferredEvents(
	at swt/org.eclipse.swt.widgets.Display.readAndDispatch(
	at hdf.view.HDFView.runMainWindow(
	at hdf.view.HDFView$
	at swt/org.eclipse.swt.widgets.Synchronizer.syncExec(
	at swt/org.eclipse.swt.widgets.Display.syncExec(
	at hdf.view.HDFView.main(
Failed to launch JVM


If this is an ubuntu machine, HDF has an ubuntu 20.10 based release file. Send a message to
The error indicates a failure with the hdf4 library stack. Have you tried an hdf5 file to determine if it is only a hdf4 problem?



I’m not sure I have any hdf5 file handy…
I’m using Ubuntu 20.04. Is the 20.10 based release expected to work on 20.04?


This could mean your system lacks a supporting library. The ldd program is used to list the libraries required by a program or .so library. My fedora 33 system (which so far is used only with NtCDF4 files) shows:

$ cd /opt/hdfview/lib/app
$ ldd
ldd: warning: you do not have execution permission for `./' (0x00007fff2b7e8000) => not found => /opt/hdfview/lib/app/./ (0x00007fb82381a000) => /lib64/ (0x00007fb82364f000) => /lib64/ (0x00007fb823509000) => /lib64/ (0x00007fb823502000)
        /lib64/ (0x00007fb823d8c000)


It seems that I get something similar:

$ ldd (0x00007ffcc9cb9000) => not found => /opt/hdfview/lib/app/./ (0x00007f08d24c9000) => /lib/x86_64-linux-gnu/ (0x00007f08d22d7000) => /lib/x86_64-linux-gnu/ (0x00007f08d2188000) => /lib/x86_64-linux-gnu/ (0x00007f08d2182000)
	/lib64/ (0x00007f08d2a30000)

#9 => not found

That file is from hdf4 distribution, which somehow did not get in the packaging. It is available from the hdf4 binary, which should be on the website, else ask for the ubuntu version from



I downloaded hdf-4.2.15-linux-centos7-x86_64-shared.tar.gz, but it does not contain


okay, strange, I just checked a hdf4 build and an ldd of and there was no libxdr in the list.
Can you check ldd of on that hdf4 binary?



Then if ldd on hdf4 doesn’t show libxdr, try copying the hdf4 so files over the hdfview so files.



Note that the so.4 files are symlinks in hdf4, I just copied over the so.4.2.15 file and renamed it to so.4