簡體   English   中英

錯誤:包“xgboost”編譯失敗

[英]ERROR: compilation failed for package ‘xgboost’

我使用 GCC 4.4.7 如下:

gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

在 RHEL 機器上:

uname -a
Linux qalhdpap002 2.6.32-642.6.1.el6.x86_64 #1 SMP Thu Aug 25 12:42:19 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

當我安裝 xgboost 包時,出現此錯誤。 不知道如何修改 make 文件以禁用此設置。 有什么想法嗎?

* 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 -DDMLC_LOG_BEFORE_THROW=0 -DDMLC_ENABLE_STD_THREAD=0 -DDMLC_DISABLE_STDIN=1 -DDMLC_LOG_CUSTOMIZE=1 -DXGBOOST_CUSTOMIZE_LOGGER=1 -DRABIT_CUSTOMIZE_MSG_ -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 xgboost_R.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*, SEXPREC*, 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’

具體來說,我該怎么做:

compile without c++0x

假設您是具有管理員權限的 root 用戶,希望以下步驟對您有所幫助。

1. 為您的系統安裝一個帶有存儲庫的軟件包:

在 CentOS 上,安裝 CentOS 存儲庫中可用的軟件包 centos-release-scl:

$ sudo yum install centos-release-scl 

在 RHEL 上,為您的系統啟用 RHSCL 存儲庫:

$ sudo yum-config-manager --enable rhel-server-rhscl-6-rpms

2.安裝集合:

$ sudo yum install devtoolset-4 

3.開始使用軟件合集:

$ scl enable devtoolset-4 bash

5. 安裝 V8 RPMS:

$ sudo yum install v8 v8-devel

6.添加R模塊:

$ sudo R
> install.packages("plotly")
> install.packages("forecast")
> install.packages("xgboost")
> q()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM