fitsheader command not found

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

Introduction

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

fitsheader: command not found

or when using sudo you get the following error message

sudo: fitsheader: command not found

Solutions to fitsheader: command not found

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

In Ubuntu fitsheader is provided by astropy-utils package.

astropy-utils is:

The astropy package contains core functionality and some common tools needed for performing astronomy and astrophysics research with Python.

This package contains the tools that come with astropy:

  • fitscheck: Detect and fix FITS standards violations
  • fits2bitmap: Create a bitmap file from a FITS image.
  • fitsdiff: Compare two FITS image files and report the differences in header keywords and data.
  • fitsheader: Print the header(s) of one or more FITS file(s) to the standard output in a human-readable format.
  • samp_hub: SAMP Hub Server.
  • volint: Check a VOTable file for compliance to the VOTable specification
  • wcslint: Check the WCS keywords in a FITS file for compliance against the standards

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

sudo apt-get -y install astropy-utils

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

You can also use apt command to install astropy-utils.

sudo apt -y install astropy-utils

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

sudo aptitude install astropy-utils

Summary

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