简体   繁体   中英

ERROR: compilation failed for package ‘adagio’

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM