随机森林安装失败

时间:2016-03-18 07:46:30

标签: r random-forest

我尝试在CentoOS 6机器上的R中安装randomForest软件包,如下所示:

install.packages("/var/installation_files/randomForest_4.6-12.tar.gz", repos = NULL, type="source")

但是,它会引发以下错误:

> install.packages("/var/installation_files/randomForest_4.6-12.tar.gz", repos = NULL, type="source")
* installing *source* package ‘randomForest’ ...
** package ‘randomForest’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/opt/vertica/R/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c classTree.c -o classTree.o
gcc -std=gnu99 -I/opt/vertica/R/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c regTree.c -o regTree.o
gcc -std=gnu99 -I/opt/vertica/R/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c regrf.c -o regrf.o
gcc -std=gnu99 -I/opt/vertica/R/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c rf.c -o rf.o
gfortran   -fpic  -g -O2  -c rfsub.f -o rfsub.o
gcc -std=gnu99 -I/opt/vertica/R/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c rfutils.c -o rfutils.o
gcc -std=gnu99 -shared -L/opt/vertica/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o randomForest.so classTree.o regTree.o regrf.o rf.o rfsub.o rfutils.o -lgfortran -lm -lquadmath -L/opt/vertica/R/lib -lR
/usr/bin/ld: cannot find -lquadmath
collect2: ld returned 1 exit status
make: *** [randomForest.so] Error 1
ERROR: compilation failed for package ‘randomForest’
* removing ‘/opt/vertica/R/library/randomForest’
* restoring previous ‘/opt/vertica/R/library/randomForest’
Warning message:
In install.packages("/var/installation_files/randomForest_4.6-12.tar.gz",  :
  installation of package ‘/var/installation_files/randomForest_4.6-12.tar.gz’ had non-zero exit status

sessionInfo:

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: CentOS release 6.6 (Final)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

有人可以帮忙解决这个问题吗?

1 个答案:

答案 0 :(得分:1)

按照此处的说明启用我们安装的devtoolset-2后,此工作正常:https://unix.stackexchange.com/questions/175851/how-to-permanently-enable-scl-centos-6-4

我能够在此之后安装R包