我尝试安装xgboost
包。但我偶然发现了这个错误
* installing *source* package 'xgboost' ...
** libs
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="xgboost.dll" ' had status 127
ERROR: compilation failed for package 'xgboost'
* removing 'C:/Users/mancph01/Documents/R/win-library/3.2/xgboost'
Error: Command failed (1)
我尝试使用此命令从github安装此软件包
devtools::install_github('dmlc/xgboost',subdir='R-package')
答案 0 :(得分:2)
“xgboost”也可在CRAN上找到。
所以你只需要运行install.packages("xgboost")
来处理所有事情:)
答案 1 :(得分:0)
我在安装xgboost时遇到问题,但可以通过以下方式安装较旧的存档版本('0.90.0.2')
packageurl <- "http://cran.r-
project.org/src/contrib/Archive/xgboost/xgboost_0.90.0.2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")