仅安装Rtools35并具有管理员权限,并选中所有选项:
并运行:
> Sys.which("ls.exe")
ls.exe
"C:\\Rtools\\bin\\ls.exe"
> Sys.which("gcc.exe")
gcc.exe
""
我还手动查看了'C:\ Rtools \ bin \',发现gcc.exe丢失了。无法生成软件包。
尝试使用installr
。
library(installr)
> install.rtools()
Loading required namespace: devtools
No need to install Rtools - You've got the relevant version of Rtools installed
另外,请确保已卸载,重新启动并重新安装。
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 yaml_2.1.19