f2c command not found

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

Introduction

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

f2c: command not found

or when using sudo you get the following error message

sudo: f2c: command not found

Solutions to f2c: command not found

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

In Ubuntu f2c is provided by f2c package.

f2c is:

Translates FORTRAN 77 (with some extensions) into C, so that it can then be compiled and run on a system with no Fortran compiler. The C files must then be linked against the appropriate libraries.

This is an actively maintained FORTRAN to C translator and with the fort77 frontend provides an ideal way to compile FORTRAN routines as black boxes (for example for invocation from C). Source level debugging facilities are not available, and error messages are not as well developed as in g77.

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

sudo apt-get -y install f2c

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

You can also use apt command to install f2c.

sudo apt -y install f2c

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

sudo aptitude install f2c

Summary

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