gpt4 book ai didi

r - 从 github : Could not find build tools necessary to build data. 表安装 R 包时出错

转载 作者:行者123 更新时间:2023-12-02 18:16:12 25 4
gpt4 key购买 nike

在 RStudio 中,我尝试从 github 安装 data.table 包,如下 these instructions ,并且该包似乎下载没有问题:

> library(devtools)
> dev_mode(on=T)
Dev mode: ON
d> install_github("Rdatatable/data.table")
Downloading GitHub repo Rdatatable/data.table@master
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?

选择"is"会导致此错误消息:

Error: Could not find build tools necessary to build data.table

我认为这可能是 RStudio 问题,因此尝试在标准 R 控制台中安装该包,但这也导致了错误:

Downloading GitHub repo Rdatatable/data.table@master
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

前两个似乎特定于 Apple 操作系统,第三个表明特定于开发工具的错误,但我不知道这是否是我所看到的错误的根源。

如有任何帮助,我们将不胜感激。我在 Windows 10 中运行 R 版本 3.3.0。

最佳答案

你可以尝试:

options(buildtools.check = function(action) TRUE )

包含在 https://support.rstudio.com/hc/en-us/community/posts/212725628-Bug-report-with-devtools-install-github-in-RStudio-v0-99-1273-Preview-and-previously-with-Version-0-99-896

... should suppress RStudio's attempts to validate your build tools.

这对我有用。

关于r - 从 github : Could not find build tools necessary to build data. 表安装 R 包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37776377/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com