gmt-config command not found

In this troubleshooting guide we learn how to fix gmt-config command not found error message

Introduction

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

gmt-config: command not found

or when using sudo you get the following error message

sudo: gmt-config: command not found

Solutions to gmt-config: command not found

How To Fix gmt-config: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu gmt-config is provided by libgmt-dev package.

libgmt-dev is:

These set of libraries allow manipulating geographic and Cartesian data sets (including filtering, trend fitting, gridding, projecting, etc.) and producing Encapsulated PostScript File (EPS) illustrations ranging from simple x-y plots via contour maps to artificially illuminated surfaces and 3-D perspective views.

This package contains the files used for development of programs that use the GMT libraries (headers).

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

sudo apt-get -y install libgmt-dev

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

You can also use apt command to install libgmt-dev.

sudo apt -y install libgmt-dev

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

sudo aptitude install libgmt-dev

Summary

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