我正在使用Linux Mint并尝试在RStudio(版本1.2.1335)上安装adagio软件包,并且出现以下消息:
> 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’
>
最后,我想知道是否有人可以告诉我我应该运行哪个命令来了解计算机上安装的R的版本。
答案 0 :(得分:0)
此程序包在fortran中运行一些代码。出现错误是因为您没有安装fortran(gfortran)编译器。安装编译器,然后重试。
我通过安装包含gfortran的r-base-dev
解决了这个问题。
$ sudo apt-get install r-base-dev
如以下答案所述。