1

I tried installing randomForest package in R on a CentoOS 6 machine as follows:

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

However, it throws the following error:

> 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

Can someone help with fixing this issue?

3
  • Please add output of sessionInfo() to your post.
    – zx8754
    Mar 18, 2016 at 7:52
  • Did you install the development version of R?
    – IRTFM
    Mar 18, 2016 at 8:20
  • It is not a development version...It is the R version that comes with Vertica database
    – Ravi
    Mar 18, 2016 at 8:53

1 Answer 1

1

This worked fine after the devtoolset-2 we installed was enabled following the instructions here: https://unix.stackexchange.com/questions/175851/how-to-permanently-enable-scl-centos-6-4

I was able to install the R package after this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.