随机森林安装失败
Random Forest installation fails
我尝试在 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()
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
有人可以帮助解决这个问题吗?
按照此处的说明启用我们安装的 devtoolset-2 后,这工作正常:https://unix.stackexchange.com/questions/175851/how-to-permanently-enable-scl-centos-6-4
之后我就可以安装 R 包了
我尝试在 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()
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
有人可以帮助解决这个问题吗?
按照此处的说明启用我们安装的 devtoolset-2 后,这工作正常:https://unix.stackexchange.com/questions/175851/how-to-permanently-enable-scl-centos-6-4
之后我就可以安装 R 包了