Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error : "sh: gfortran: command not found" | Ubuntu 16.04

I am trying to install package , circular, I get the below error during the installation.

enter image description here

I tried a few option that were suggested in a few posts but it didn't work. I also tried loading other packages such as spatstat and this error doesn't occur while doing that.

Could anyone please assist me in resolving this issue.

like image 471
RBK Avatar asked Feb 25 '17 00:02

RBK


2 Answers

You need a Fortran compiler to compile certain R packages. Install it with:

sudo apt-get install gfortran
like image 62
DYZ Avatar answered Nov 13 '22 03:11

DYZ


The general idea is to install the (virtual) package r-base-dev:

Depends: r-base-core (>= 3.2.5-1xenial), build-essential, gcc, g++,
    gfortran, libblas-dev | libatlas-base-dev, 
    liblapack-dev | libatlas-base-dev, libncurses5-dev, 
    libreadline-dev, libjpeg-dev, libpcre3-dev, libpng-dev, 
    zlib1g-dev, libbz2-dev, liblzma-dev, cdbs
Suggests: debhelper, texlive-base, texlive-latex-base, 
    texlive-generic-recommended, texlive-fonts-recommended, 
    texlive-fonts-extra, texlive-extra-utils, 
    texlive-latex-recommended, texlive-latex-extra, texinfo

which groups a number of things you need for package building. Including, as you can see, the Fortran compiler.

like image 28
Dirk Eddelbuettel Avatar answered Nov 13 '22 02:11

Dirk Eddelbuettel