官网安装wiki:https://xgboost.readthedocs.io/en/latest/build.html
step1:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; make -j4
step2:
如果顺利会直接编译成功
或者会报错,如下“cc1plus: error: unrecognized command line option "-std=c++11"”
step3:
解决如下报错。因为c++11要求的g++版本必须在4.8以上。下面看一下我机器的默认的g++版本
g++ --version g++ (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
我机器的默认版本是4.4.6,而xgboost的安装必须要求在4.8以上,所以安装失败了。下面看一下我的机器到底安装了几个g++版本
whereis g++ g++: /usr/bin/g++ /usr/local/bin/g++ /usr/share/ma