Install Rtools and check if I can use it

20,397

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)

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

I hope you find the way!

Share:
20,397
Ellie
Author by

Ellie

Updated on July 14, 2022

Comments

  • Ellie
    Ellie almost 2 years

    Dear R users with awesome brains.

    I newly installed R, Rstudio today.

    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")
    

    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)

    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.

    Thanks!

    Ellie.


    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

    And the result is:

    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;"

    system('g++ -v')
    

    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:\ProgramFiles\R\R-3.4.3\library\Rtools\bin\make.exe

    Is the Rtool on my laptop available?

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

    Sys.getenv('PATH')

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

    But mine does not.

    Thank you for answering my question in advance!

    Ellie.