How To Install dh-fortran-mod on Kali Linux

In this tutorial we learn how to install dh-fortran-mod on Kali Linux. dh-fortran-mod is debhelper add-on to handle Fortran .mod files

Introduction

In this tutorial we learn how to install dh-fortran-mod on Kali Linux.

What is dh-fortran-mod

dh-fortran-mod is:

Modules were introduced in the 1990 revision of the Fortran standard. When the Fortran compiler processes a source file containing a module, it produces both an object file and a ‘.mod’ file. The latter plays a role similar to header files in C, since it is needed when compiling other source files which make use of the module.

The ‘.mod’ files are however platform dependent, and their format changes with the gfortran version.

This package provides the dh_fortran_mod command, which simplifies the inclusion of ‘.mod’ files in binary packages. First, it places the ‘.mod’ files in the correct platform- and gfortran-dependent location. Second, it adds the right dependency information on gfortran version(s).

Inclusion of dh_fortran_mod in dh sequence is also provided under the name ‘fortran_mod’.

There are three methods to install dh-fortran-mod on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install dh-fortran-mod Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install dh-fortran-mod using apt-get by running the following command:

sudo apt-get -y install dh-fortran-mod

Install dh-fortran-mod Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install dh-fortran-mod using apt by running the following command:

sudo apt -y install dh-fortran-mod

Install dh-fortran-mod Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install dh-fortran-mod using aptitude by running the following command:

sudo aptitude -y install dh-fortran-mod

How To Uninstall dh-fortran-mod on Kali Linux

To uninstall only the dh-fortran-mod package we can use the following command:

sudo apt-get remove dh-fortran-mod

Uninstall dh-fortran-mod And Its Dependencies

To uninstall dh-fortran-mod and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove dh-fortran-mod

Remove dh-fortran-mod Configurations and Data

To remove dh-fortran-mod configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge dh-fortran-mod

Remove dh-fortran-mod configuration, data, and all of its dependencies

We can use the following command to remove dh-fortran-mod configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge dh-fortran-mod

Dependencies

dh-fortran-mod have the following dependencies:

References

Summary

In this tutorial we learn how to install dh-fortran-mod package on Kali Linux using different package management tools: apt, apt-get and aptitude.