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 <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org> Bugs: https://bugs.launchpad.net/ubuntu/+filebug 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 Homepage: http://www.hdfgroup.org/hdf-java-html/ 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
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 ***
*** java.io.IOException: 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(H4File.java:207)
at hdf.view.TreeView.DefaultTreeView.openFile(DefaultTreeView.java:2348)
at hdf.view.HDFView.openLocalFile(HDFView.java:1812)
at hdf.view.HDFView$26.widgetSelected(HDFView.java:973)
at swt/org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at swt/org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at swt/org.eclipse.swt.widgets.Display.sendEvent(Display.java:5685)
at swt/org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1423)
at swt/org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4953)
at swt/org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4446)
at hdf.view.HDFView.runMainWindow(HDFView.java:378)
at hdf.view.HDFView$39.run(HDFView.java:2572)
at swt/org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
at swt/org.eclipse.swt.widgets.Display.syncExec(Display.java:5795)
at hdf.view.HDFView.main(HDFView.java:2563)
Failed to launch JVM
If this is an ubuntu machine, HDF has an ubuntu 20.10 based release file. Send a message to help@hdfgroup.org.
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?
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 libmfhdf.so.4
ldd: warning: you do not have execution permission for `./libmfhdf.so.4'
linux-vdso.so.1 (0x00007fff2b7e8000)
libxdr.so.4 => not found
libhdf.so.4 => /opt/hdfview/lib/app/./libhdf.so.4 (0x00007fb82381a000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb82364f000)
libm.so.6 => /lib64/libm.so.6 (0x00007fb823509000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fb823502000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb823d8c000)
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 help@hdfgroup.org.
okay, strange, I just checked a hdf4 build and an ldd of libmfhdf.so and there was no libxdr in the list.
Can you check ldd of libmfhdf.so on that hdf4 binary?