2017-03-31 76 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可執行文件。進入兼容模式,取消選擇以管理員身份運行。

一切再次運作。