hdf2jpeg command not found

In this troubleshooting guide we learn how to fix hdf2jpeg command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

hdf2jpeg: command not found

or when using sudo you get the following error message

sudo: hdf2jpeg: command not found

Solutions to hdf2jpeg: command not found

How To Fix hdf2jpeg: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu hdf2jpeg is provided by hdf4-tools package.

hdf4-tools is:

HDF is a multi-object file format for storing and transferring graphical and numerical data mainly used in scientific computing. HDF supports several different data models, including multidimensional arrays, raster images, and tables. Each defines a specific aggregate data type and provides an API for reading, writing, and organizing the data and metadata. New data models can be added by the HDF developers or users.

This package includes some basic utilities to view, pack, unpack, HDF files.

To fix this problem, we can install more using the command below.

sudo apt-get -y install hdf4-tools

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install hdf4-tools.

sudo apt -y install hdf4-tools

Or if you have aptitude installed you can use the following command.

sudo aptitude install hdf4-tools

Summary

In this tutorial we learn how to fix hdf2jpeg command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.