从RStudio中我试图安装从github下面的these instructions的data.table软件包,并且软件包似乎没有下载问题:从github安装R软件包时出错:无法找到构建data.table所需的生成工具
> library(devtools)
> dev_mode(on=T)
Dev mode: ON
d> install_github("Rdatatable/data.table")
Downloading GitHub repo Rdatatable/[email protected]
from URL https://api.github.com/repos/Rdatatable/data.table/zipball/master
然后我收到以下提示:在此错误消息
Building R package from source requires installation of additional build tools. Do you want to install the additional tools now?
选择 “Yes” 的结果:
Error: Could not find build tools necessary to build data.table
想这可能是一个RStudio问题,我试图在标准的R控制台安装包,但是这也造成了一个错误:
Downloading GitHub repo Rdatatable/[email protected]
from URL https://api.github.com/repos/Rdatatable/data.table/zipball/master
Installing data.table
"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/Robert/AppData/Local/Temp/RtmpOOKOKu/devtools246832c52ab/Rdatatable-data.table-4348ff4" \
--library="C:/Users/Robert/Documents/R-dev" --install-tests
* installing *source* package 'data.table' ...
** libs
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-33~1.0/include" -DNDEBUG -I"d:/Compiler/gcc-4.9.3/local330/include" -fopenmp -O2 -Wall -std=gnu99 -mtune=core2 -c assign.c -o assign.o
c:/Rtools/mingw_64/bin/gcc: not found
make: *** [assign.o] Error 127
Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-33~1.0/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.0/share/make/winshlib.mk" SHLIB="data.table.dll" WIN=64 TCLBIN=64 OBJECTS="assign.o bmerge.o chmatch.o dogroups.o fastmean.o fcast.o fmelt.o forder.o frank.o fread.o fwrite.o gsumm.o ijoin.o init.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o uniqlist.o vecseq.o wrappers.o"' had status 2
ERROR: compilation failed for package 'data.table'
* removing 'C:/Users/Robert/Documents/R-dev/data.table'
Error: Command failed (1)
d>
我发现SO三个相关的帖子:
Error: Could not find build tools necessary to build dplyr
Error : Could not find build tools necessary to build
Could not find build tools necessary . Facing error with devtools
前两个似乎专门针对苹果OS,第三建议具体到devtools一个错误,但我不知道这是我看到错误的根源。
任何帮助,将不胜感激。我在Windows 10
@Procrastinatus感谢。当我执行install.packages命令在这些指令中,R的报告“安装包‘data.table’具有非零退出状态”。为了时间的利益,我现在要跳过这个,只使用data.frame而不是data.table。 – Robert
为什么不使用[CRAN版](https://cran.r-project.org/web/packages/data.table/index.html),而不是开发版? – Jaap
因为我的代码受到在dev版本中修复的错误的影响。 – Robert