RBK
RBK

Reputation: 405

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.

Upvotes: 16

Views: 23186

Answers (2)

Dirk is no longer here
Dirk is no longer here

Reputation: 368579

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.

Upvotes: 17

DYZ
DYZ

Reputation: 57105

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

sudo apt-get install gfortran

Upvotes: 38

Related Questions