在 UBUNTU 16.04 中的 R 上安装 mclust 包时出现问题 - /bin/bash: f95: 未找到命令

在 UBUNTU 16.04 中的 R 上安装 mclust 包时出现问题 - /bin/bash: f95: 未找到命令

我尝试mclust通过以下方式在 Ubuntu 16.04 中安装 R 包:

install.packages("mclust")

但我收到了这个错误。

    Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.um.ac.ir/src/contrib/mclust_5.2.2.tar.gz'
Content type 'application/x-gzip' length 2749972 bytes (2.6 MB)
==================================================
downloaded 2.6 MB

* installing *source* package ‘mclust’ ...
** package ‘mclust’ successfully unpacked and MD5 sums checked
** libs
f95   -fpic  -g -O2  -c mclust.f -o mclust.o
/bin/bash: f95: command not found
/usr/local/lib/R/etc/Makeconf:155: recipe for target 'mclust.o' failed
make: *** [mclust.o] Error 127
ERROR: compilation failed for package ‘mclust’
* removing ‘/usr/local/lib/R/site-library/mclust’

The downloaded source packages are in
    ‘/tmp/Rtmpd4PnFn/downloaded_packages’
Warning message:
In install.packages("mclust") :
installation of package ‘mclust’ had non-zero exit status

答案1

这是 Fortran 编译器的问题 ( /bin/bash: f95: command not found):您尚未安装它。您可以使用以下方式安装它

sudo apt-get install gfortran

相关内容