How to fix R package installation /bin/bash: gfortran: command not found

Problem:

While installing some R package, you see an error message like

gfortran_missing_output.txt
/bin/bash: gfortran: command not found

Solution

You need to install the gfortran compiler. On Ubuntu, you can do that using

example.sh
sudo apt -y install gfortran

 


Check out similar posts by category: R