[R] Problem to install xgboost package

Shu-Ju Tu sjtu at gap.cgu.edu.tw
Tue May 16 04:35:35 CEST 2017


I planned to learn R and their machine learning algorithms such as xgboost.
I just installed R 3.3 in our CentOS linux system.
Linus system: centos-release-6-9.el6.12.3.x86_64
I used the command: yum install R.
I successfully install "rJava" and "mlr" packages.
Then I used the following command:
Unfortunately, I cannot install xgboost successfully.
Can anyone out there help me when you can get a chance.


--- begin error message
trying URL 'https://mirror.usertrust.info/cranmirror/src/contrib/xgboost_0.6-4.tar.gz'
Content type 'application/x-gzip' length 596158 bytes (582 KB)
downloaded 582 KB

* installing *source* package ‘xgboost’ ...
** package ‘xgboost’ successfully unpacked and MD5 sums checked
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I./include
-I./dmlc-core/include -I./rabit/include -I. -DXGBOOST_STRICT_R_MODE=1
-DRABIT_STRICT_CXX98_ -I/usr/local/include   -fopenmp  -fpic  -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -c xgboost_R.cc -o
In file included from ./dmlc-core/include/dmlc/logging.h:15,
                 from xgboost_R.cc:2:
./dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need
g++-4.6 or higher to compile allthe features in dmlc-core, compile
without c++0x, some features may be disabled
xgboost_R.cc: In function ‘SEXPREC* XGBoosterSetAttr_R(SEXPREC*,
xgboost_R.cc:412: error: ‘nullptr’ was not declared in this scope
make: *** [xgboost_R.o] Error 1
ERROR: compilation failed for package ‘xgboost’
* removing ‘/home/sjtu/R/x86_64-redhat-linux-gnu-library/3.3/xgboost’

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

More information about the R-help mailing list