3
我嘗試編譯xgboost時遇到錯誤。我沒有sudo訪問,這讓事情變得更加棘手。XGBoost安裝錯誤
我跑了以下內容:
git clone https://github.com/dmlc/xgboost.git --recursive
cd xgboost
make
使我有以下錯誤:
g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp src/learner.cc -o build/learner.o
In file included from dmlc-core/include/dmlc/logging.h:15,
from include/xgboost/logging.h:11,
from src/learner.cc:7:
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
In file included from include/xgboost/./gbm.h:18,
from include/xgboost/learner.h:16,
from src/learner.cc:8:
include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from include/xgboost/learner.h:16,
from src/learner.cc:8:
include/xgboost/./gbm.h: At global scope:
include/xgboost/./gbm.h:72: error: ‘nullptr’ was not declared in this scope
In file included from src/learner.cc:17:
src/./common/io.h:30: error: expected ‘;’ before ‘override’
src/learner.cc:496: error: expected ‘;’ at end of input
src/learner.cc:496: error: expected ‘}’ at end of input
In file included from src/learner.cc:17:
src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/./common/io.h: At global scope:
src/./common/io.h:28: error: expected unqualified-id at end of input
src/./common/io.h:28: error: expected ‘}’ at end of input
src/./common/io.h:28: error: expected ‘}’ at end of input
make: *** [build/learner.o] Error 1