我遵循this指令来安装R和Rstudio,特别是在R的安装中,我将C:\R\R-3.4.1
设置为存储R而不是C:\Program Files\R\R-3.4.1
的文件夹,以避免路径空间上的任何问题。然后,我按照this指令逐步下载并安装了最新版本的rtools
。具体来说,在安装rtools期间,会有一个消息框然后,我按照说明进行了操作,然后单击了两者。
然后我打开Rstudio
(目前,它很新鲜,除了Rstudio附带的那些基本软件包之外,我没有安装任何R软件包),然后install.packages("devtools")
一切看起来都很顺利
package ‘withr’ successfully unpacked and MD5 sums checked package ‘devtools’ successfully unpacked and MD5 sums checked The downloaded binary packages are in C:\Users\FTXX\AppData\Local\Temp\RtmpK2EE70\downloaded_packages
然后
library(devtools) find_rtools(T) Error: running command '"C:/R/R-34~1.1/bin/x64/R" --no-site-file --no- environ --no-save --no-restore --quiet CMD config CC' had status 65535
我的系统路径是
Sys.getenv()['PATH'] PATH C:\R\R- 3.4.1\bin\x64;c:\Rtools\bin;c:\Rtools\mingw_32\bin;C:\R\R- 3.4.1\bin;C:\Program Files\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin\;C:\Users\FTXX\AppData\Local\Continuum\Anaconda3;C:\Users\FTXX\AppData\Local\Continuum\Anaconda3\Scripts;C:\Users\FTXX\AppData\Local\Continuum\Anaconda3\Library\bin
我还发现
Sys.getenv()['PATH']
和shell("PATH")
的输出生成不同的消息。在Shell('PATH')
中说
Warning messages: 1: running command 'C:\Program Files\mingw-w64\x86_64-5.3.0-posix-seh- rt_v4-rev0\mingw64\bin /c PATH' had status 127 2: In shell("PATH") : 'PATH' execution failed with error code 127
我也输出一些变量
Sys.which("ls.exe") ls.exe "c:\\Rtools\\bin\\ls.exe" Sys.which("gcc.exe") gcc.exe "c:\\Rtools\\mingw_32\\bin\\gcc.exe"
并且我的R是3.4.1,我在Windows 10上。任何建议,我们都感激不尽。
我按照此说明安装R和Rstudio,特别是在R的安装中,我将C:\ R \ R-3.4.1设置为存储R的文件夹,而不是C:\ Program Files \ R \ R- 3.4.1避免任何可能的...
也许您可以使用installr