问题描述
我已经咨询了与我的特定问题相关的SO的现有条目,但仍然无法解决.
I have consulted existing entries on SO related to my specific issue, but still could not resolve it.
我正在尝试使用具有有限管理员权限的计算机在工作,但是我可以运行Rtools.exe,所以我安装了它.
I am trying to do this with my machine at work, where I have limited admin rights, but I can run Rtools.exe, so I installed it.
我对R的设置是:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
version.string R version 3.3.0 (2016-05-03)
我是RStudion版本0.99.902.我安装了Rtools版本3.3.0.1959.
I am RStudion Version 0.99.902. I installed Rtools version 3.3.0.1959.
所有R,Rstudio和Rtools都安装在C:/WORK/中,在这里我具有一些有限的管理员权限.
All of R, Rstudio, and Rtools are installed in C:/WORK/, which is where I have some limited admin rights.
在我的系统ENV变量中,我已设置:
In my system ENV variable, I have set up:
C:\\WORK\\Rtools\\bin; C:\\WORK\\Rtools\\gcc- 4.6.3\\bin; C:\\WORK\\R-3.3.0\\bin\\x64;"
我跑步时
system('where make')
我知道
C:\WORK\Rtools\bin\make.exe
我跑步时
system('g++ -v')
我得到:
Using built-in specs.
COLLECT_GCC=C:\WORK\Rtools\GCC-46~1.3\bin\G__~1.EXE
COLLECT_LTO_WRAPPER=c:/WORK/rtools/gcc-46~1.3/bin/../libexec/gcc/i686-w64- mingw32/4.6.3/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /data/gannet/ripley/Sources/mingw-test3/src/gcc/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --prefix=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --with-gmp=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpfr=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpc=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --disable-shared --enable-static --enable-targets=all --enable-languages=c,c++,fortran --enable-libgomp --enable-sjlj-exceptions --enable-fully-dynamic-string --disable-nls --disable-werror --enable-checking=release --disable-win32-registry --disable-rpath --disable-werror CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer' LDFLAGS=
Thread model: win32
gcc version 4.6.3 20111208 (prerelease) (GCC)
编译时出现此错误:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created!
c:/Rtools/mingw_64/bin/g++: not found
我的问题是:为什么R还在
My question is: why is R still looking for g++ in
c:/Rtools/mingw_64/bin/g++
我不是已经设置R在
C:/WORK/Rtools?
即使是我手动添加
c:/WORK/Rtools/mingw_64/bin/g++
在ENV变量中,我仍然遇到相同的错误. (由于管理员权限,我无法在C:/中创建Rtools文件夹.)
in the ENV variable, I still got the same error. (I cannot make Rtools folder in C:/ due to admin rights.)
有人遇到这个特定问题吗?
Has anyone run into this specific issue?
推荐答案
路径c:/Rtools/mingw_64/bin/
硬编码为R安装(在我的情况下为C:\Progs\R\R-3.4.1\etc\x64
)中某个位置的文件Makeconf
中. BINPREF的值.
The path c:/Rtools/mingw_64/bin/
is hard-coded into the file Makeconf
located somewhere in the R installation (in my case C:\Progs\R\R-3.4.1\etc\x64
), as the value of the variable BINPREF.
最简单的方法是将此路径更改为您的路径C:/WORK/Rtools/bin
(在我的情况下是C:/Progs/RTools/3.4/mingw_64/bin/
).这对我来说是全新安装的R-3.4.1和Rtools3.4以及一个最小的示例.
The easiest thing to do is to change this path to your path C:/WORK/Rtools/bin
(in my case was C:/Progs/RTools/3.4/mingw_64/bin/
). That worked for me in a fresh installation of R-3.4.1 and Rtools3.4, and a minimal example.
这篇关于已安装Rcpp Rtools,但未找到错误消息g ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!