2017-03-31 182 views
0

我想创建一个R包并下载了Rtools和包c("devtools", "roxygen2", "testthat", "knitr")。现在,我检查,如果一切正常:安装Rtools时出错 - devtools :: has_devel()失败

library(devtools) has_devel()

,它不是,我得到的错误:

"C:/Users/xxx/DOCUME~1/R/R-33~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \ 
    --quiet CMD SHLIB foo.c 

Warning message: 
running command 'make -f "C:/Users/XYZ/DOCUME~1/R/R-33~1.1/etc/x64/Makeconf" -f "C:/Users/XYZ/DOCUME~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB="foo.dll" WIN=64 TCLBIN=64 OBJECTS="foo.o"' had status 127 
Error: Command failed (1) 

我使用Windows和新鲜RStudio。

你知道它是什么意思或如何修复它吗?

+0

潜在[相关的SO问题。](http://stackoverflow.com/questions/1763156/127-return-code-from) – vincentmajor

+0

欢迎来到SO!我对文本和标题进行了轻度修改,使其更易于阅读。 – jimmyb

+0

什么是SO? ??? –

回答

1

笑我刚才跑这个代码:

install.packages("devtools") 
library(devtools) 
install_github("hadley/devtools") 
devtools::build_github_devtools() 
find_rtools() 
has_devel() 
build_github_devtools() 

https://github.com/hadley/devtools/issues/1219

现在has_devel返回TRUE:O:d

0

不知道这是否会为你工作,在以前,我将R可执行文件更改为以管理员身份运行。 (不要这样做!)我去了 C:\ Program Files \ R \ R-3.4.1 \ bin \ x64并右键单击R可执行文件。进入兼容模式,取消选择以管理员身份运行。

一切再次运作。