Error installing and running rcpp

时光毁灭记忆、已成空白 提交于 2019-12-01 03:43:26

Had the same endless loop issue when trying to install Twitter's BreakoutDetection (which is also written in cpp)

fixed by executing the following

Sys.setenv(PATH="%PATH%;C:/Rtools/gcc-4.6.3/bin;c:/Rtools/bin")

and then answering "no" when presented with the following prompt:

"Install Build Tools Compiling C/C++ code for R requires installation of additional build tools. Do you want to install the additional tools now?"

Didn't try these actions independently so not sure if either on their own would have fixed the issue

In the end it was something a bit left-field. Inspired by the following post, I had a look at the ComSpec environment variable. Not quite sure how, but I had it set to "cmd.exe".

Removing the double quotes, so it said cmd.exe, and then rebooting fixed everything.

Thanks to all who've tried to help.

Andrew Rohne

I found that ensuring all of these were in my path fixed it. I did this with RStudio closed; I didn't reboot after.

C:\Program Files\R\R-3.1.3\bin\x64
C:\Program Files\R\R-3.1.3\bin
C:\RBuildTools\3.2\bin
C:\RBuildTools\3.2\gcc-4.6.3\bin64
C:\RBuildTools\3.2\gcc-4.6.3\bin
C:\RBuildTools\3.2\gcc-4.6.3\i686-w64-mingw32\bin

These are on my Win7-64bit computer. YMMV, and I'm mostly posting this to ensure others see it if they are having the same issue.

I experienced the same problem, I fixed this problem by adding Rtools dir into env variables:

Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!