I got an following error message while installing xgboost package on R :
C++ compiler cannot create executables
To solve this problem, updating gcc & cmake : gcc : 4.8.5 → 8.5.0 g++ : 4.8.5 → 8.5.0 CMake : 2.8.12.2 → 3.18
After this update, I can only be installed up to 1.1.1.1. But I need a version of xgboost package 1.7.3.1 or higer.
Still got an error message...
> packageurl <- "http://cran.r-project.org/src/contrib/Archive/xgboost/xgboost_1.2.0.1.tar.gz"
> install.packages(packageurl, repos=NULL, type="source")
Installing package into ‘/home/subinji33/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
URL 'http://cran.r-project.org/src/contrib/Archive/xgboost/xgboost_1.2.0.1.tar.gz'을 시도합니다
Content type 'application/x-gzip' length 971402 bytes (948 KB)
==================================================
downloaded 948 KB
* installing *source* package ‘xgboost’ ...
** 패키지 ‘xgboost’는 성공적으로 압축해제되었고, MD5 sums 이 확인되었습니다
** using staged installation
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking Backtrace lib...
checking for backtrace in -lexecinfo... no
checking endian...
configure: creating ./config.status
config.status: creating src/Makevars
** libs
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined
* removing ‘/home/subinji33/R/x86_64-redhat-linux-gnu-library/3.6/xgboost’
* restoring previous ‘/home/subinji33/R/x86_64-redhat-linux-gnu-library/3.6/xgboost’
Warning in install.packages :
installation of package ‘/tmp/RtmpkrU2VY/downloaded_packages/xgboost_1.2.0.1.tar.gz’ had non-zero exit status
My sessioninfo :
sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=ko_KR.UTF-8 LC_NUMERIC=C LC_TIME=ko_KR.UTF-8 LC_COLLATE=ko_KR.UTF-8 LC_MONETARY=ko_KR.UTF-8
[6] LC_MESSAGES=ko_KR.UTF-8 LC_PAPER=ko_KR.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=ko_KR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shapviz_0.9.2 xgboost_1.1.1.1 lattice_0.20-38 ggplot2_3.4.2 lubridate_1.8.0 stringr_1.5.0 data.table_1.14.8
[8] tidyr_1.2.0 dplyr_1.1.2 glue_1.6.2 pool_1.0.1 RPostgreSQL_0.7-5 DBI_1.1.3
loaded via a namespace (and not attached):
[1] tidyselect_1.2.0 listenv_0.9.0 purrr_0.3.4 splines_3.6.0 colorspace_2.1-0 vctrs_0.6.3 generics_0.1.2
[8] yaml_2.3.5 utf8_1.2.3 survival_2.44-1.1 prodlim_2023.03.31 rlang_1.1.1 later_1.3.1 pillar_1.9.0
[15] withr_2.5.0 foreach_1.5.2 lifecycle_1.0.3 plyr_1.8.8 lava_1.7.2.1 timeDate_4022.108 munsell_0.5.0
[22] gtable_0.3.3 future_1.33.0 codetools_0.2-16 parallel_3.6.0 class_7.3-15 fansi_1.0.4 Rcpp_1.0.11
[29] scales_1.2.1 ipred_0.9-14 parallelly_1.36.0 digest_0.6.29 stringi_1.7.12 grid_3.6.0 hardhat_1.3.0
[36] cli_3.6.1 tools_3.6.0 magrittr_2.0.3 tibble_3.2.1 future.apply_1.11.0 pkgconfig_2.0.3 MASS_7.3-51.4
[43] Matrix_1.5-1 gower_1.0.1 rstudioapi_0.13 iterators_1.0.14 globals_0.16.2 R6_2.5.1 rpart_4.1-15
[50] nnet_7.3-12 nlme_3.1-139 compiler_3.6.0
gcc & Cmake version : gcc & Cmake version