1

I am using Linux Mint and trying to install the adagio package on RStudio (Version 1.2.1335) and the following message is appearing:

> install.packages("adagio")
Installing package into ‘/home/ricardoramos/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
tentando a URL 'https://cloud.r-project.org/src/contrib/adagio_0.7.1.tar.gz'
Content type 'application/x-gzip' length 42390 bytes (41 KB)
==================================================
downloaded 41 KB

* installing *source* package ‘adagio’ ...
** package ‘adagio’ successfully unpacked and MD5 sums checked
** libs
gfortran   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong  -c assgn.f -o assgn.o
/bin/bash: gfortran: comando não encontrado
/usr/lib/R/etc/Makeconf:182: recipe for target 'assgn.o' failed
make: *** [assgn.o] Error 127
ERROR: compilation failed for package ‘adagio’
* removing ‘/home/ricardoramos/R/x86_64-pc-linux-gnu-library/3.4/adagio’
Warning in install.packages :
  installation of package ‘adagio’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpXwvbVP/downloaded_packages’
> 

Finally, I would like to know if anyone could tell me which command should I run to know the version of R installed on my machine.

ricardoramos
  • 891
  • 3
  • 18
  • 35

1 Answers1

0

This package runs some code in fortran. The error appears because you do not have the fortran (gfortran) compiler installed. Install the compiler and try again.

I solved this problem by installing r-base-dev which contains gfortran.

$ sudo apt-get install r-base-dev

As explained in the following answer.

https://stackoverflow.com/a/6306649/2918302

ricardoramos
  • 891
  • 3
  • 18
  • 35