安装Rtools并检查是否可以使用 [英] Install Rtools and check if I can use it

查看:850
本文介绍了安装Rtools并检查是否可以使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的R用户,他们的大脑真棒.

Dear R users with awesome brains.

我今天新安装了R,Rstudio.

I newly installed R, Rstudio today.

从cran下载完Rtools.exe文件并将其解压缩后,当我尝试在Rstudio中安装软件包时,出现了此警告消息

After I finished download Rtools.exe file from cran and unzip it, I've got this warning message when I tried to install the package in Rstudio

install.packages("Rtools")

将软件包安装到"C:/Users/Ellie/Documents/R/win-library/3.4" (因为未指定"lib") install.packages中的警告: 软件包"Rtools"不可用(对于R版本3.4.3)

Installing package into ‘C:/Users/Ellie/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘Rtools’ is not available (for R version 3.4.3)

我无法理解"Rtools不适用于R版本3.4.3",因为它几天前已在另一台计算机上工作.

I cannot understand that "Rtools is not available for R version 3.4.3" because it worked on another computer a couple of days ago.

如果您对此问题发表评论,将会很有帮助.

It would be helpful if you give me a comment about this problem.

谢谢!

Ellie.

我找到了一个可以帮助我检查是否可以在R中使用Rtools的站点. (感谢让我知道Rtools不是软件包)

I found the site that helps me to check if I can use Rtools in R. (Thanks for letting me know the Rtools is not a package)

https://github.com/stan-dev /rstan/wiki/Install-Rtools-for-Windows

结果是:

Sys.getenv('PATH')

[1]"C:\ Rtools \ bin; C:\ Program Files \ R \ R-3.4.3 \ bin \ x64; C:\ Program Files \ R \ R-3.4.3 \ library \ Rtools \ bin; C:\ Program Files \ R \ R-3.4.3 \ library \ Rtools \ mingw_32 \ bin; C:\ WINDOWS \ system32; C:\ WINDOWS; C:\ WINDOWS \ System32 \ Wbem; C:\ WINDOWS \ System32 \ WindowsPowerShell \ v1.0 \; C:\ Rtools \ bin; C:\ Users \ Ellie \ AppData \ Local \ Microsoft \ WindowsApps;"

[1] "C:\Rtools\bin;C:\Program Files\R\R-3.4.3\bin\x64;C:\Program Files\R\R-3.4.3\library\Rtools\bin;C:\Program Files\R\R-3.4.3\library\Rtools\mingw_32\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Rtools\bin;C:\Users\Ellie\AppData\Local\Microsoft\WindowsApps;"

system('g++ -v')

使用内置规格. COLLECT_GCC = C:\ PROGRA〜1 \ R \ R-34〜1.3 \ library \ Rtools \ mingw_32 \ bin \ G__〜1.EXE COLLECT_LTO_WRAPPER = C:/PROGRA~1/R/R-34~1.3/library/Rtools/mingw_32/bin/../libexec/gcc/i686-w64-mingw32/4.9.3/lto-wrapper.exe 目标:i686-w64-mingw32 配置为:../../../src/gcc-4.9.3/configure --host = i686-w64-mingw32 --build = i686-w64-mingw32 --target = i686-w64-mingw32-前缀=/mingw32 --with-sysroot =/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32 --with-gxx-include-dir =/mingw32/i686 -w64-mingw32/include/c ++ --enable-static --disable-shared --disable-multilib --enable-languages = c,c ++,fortran,lto --enable-libstdcxx-time = yes --enable-threads = posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking = release --enable-full-dynamic-string --enable-version-specific-runtime-libs- -disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap- disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch = i686 --with- tune = generic --with-libiconv --with-system-zlib --with-gmp =/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i6 86-w64-mingw32-static --with-mpfr =/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static --with-mpc =/home/Jeroen/mingw-gcc- 4.9.3/前提条件/i686-w64-mingw32-static --with-isl =/home/Jeroen/mingw-gcc-4.9.3/前提条件/i686-w64-mingw32-static --with-cloog =/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static --enable-cloog-backend = isl --with-pkgversion ='i686-posix-dwarf,由MinGW-W64项目构建'- with-bugurl = http://sourceforge.net/projects/mingw-w64 CFLAGS =' -O2-管道-I/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/include -I/home/Jeroen/mingw-gcc-4.9.3 /prerequisites/i686-zlib-static/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/include'CXXFLAGS ='-O2 -pipe -I/home/Jeroen /mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/include -I/home/Jeroen/mi ngw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/include'CPPFLAGS = LDFLAGS ='-pipe -L/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf- rt_v3-s/mingw32/opt/lib -L ​​/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/lib -L ​​/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/lib -Wl,-意识到大地址 螺纹型号:posix gcc版本4.9.3(i686-posix-dwarf,由MinGW-W64项目构建)

Using built-in specs. COLLECT_GCC=C:\PROGRA~1\R\R-34~1.3\library\Rtools\mingw_32\bin\G__~1.EXE COLLECT_LTO_WRAPPER=C:/PROGRA~1/R/R-34~1.3/library/Rtools/mingw_32/bin/../libexec/gcc/i686-w64-mingw32/4.9.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: ../../../src/gcc-4.9.3/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32 --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-static --disable-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static --with-mpfr=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static --with-mpc=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static --with-isl=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static --with-cloog=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='i686-posix-dwarf, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/lib -L/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/lib -L/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware' Thread model: posix gcc version 4.9.3 (i686-posix-dwarf, Built by MinGW-W64 project)

system('where make')

C:\ Rtools \ bin \ make.exe

C:\Rtools\bin\make.exe

C:\ ProgramFiles \ R \ R-3.4.3 \ library \ Rtools \ bin \ make.exe

C:\ProgramFiles\R\R-3.4.3\library\Rtools\bin\make.exe

笔记本电脑上的Rtool是否可用?

Is the Rtool on my laptop available?

因为我在上面给你的网站中看到了这部分

Because I saw this part in the site I gave you above

Sys.getenv('PATH')

Sys.getenv('PATH')

[1]"c:\\ Rtools \\ bin; c:\\ Rtools \\ gcc-4.6.3 \\ bin; ...

[1] "c:\\Rtools\\bin;c:\\Rtools\\gcc-4.6.3\\bin;...

但是我的却没有.

谢谢您提前回答我的问题!

Thank you for answering my question in advance!

Ellie.

推荐答案

正如Roland所说,Rtools不是R包,因此必须在此处安装: https://cran.r-project.org/bin/windows/Rtools/history.html(根据您的R版本)

As Roland said, Rtools is not a R packages so you must install here:https://cran.r-project.org/bin/windows/Rtools/history.html(according to you R version)

或者您可以了解您的Rtools是否已经安装

Or you can find out whether your Rtools is already installed or not

install.packages("pkgbuild") # pkgbuild is not available (for R version 3.5.0)
install.packages("devtools") # make sure you have the latest version from CRAN
library(devtools) # load package
devtools::install_github("r-lib/pkgbuild") # install updated version of pkgbuild from GitHub
library(pkgbuild) # load package
find_rtools()

ref: https://github.com/r-lib/devtools/issues /1772

希望您能找到路!

这篇关于安装Rtools并检查是否可以使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆