0

this is the warning massage I get. If anyone has an idea If anyone has an idea how to help me, I would greatly appreciate it.

WARNING: Rtools is required to build R packages but is not
currently installed. Please download and install the appropriate
version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/

  There is a binary version available but the source version is later:
         binary source needs_compilation devtools  2.4.4  2.4.5             FALSE

installing the source package ‘devtools’

trying URL
'https://cran.rstudio.com/src/contrib/devtools_2.4.5.tar.gz' Content
type 'application/x-gzip' length 374718 bytes (365 KB) downloaded 365
KB

* installing *source* package 'devtools' ...
** package 'devtools' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :   
namespace 'htmltools' 0.5.2 is being loaded, but >= 0.5.4 is required
Calls: <Anonymous> ... namespaceImport -> loadNamespace ->
namespaceImport -> loadNamespace Execution halted ERROR: lazy loading
failed for package 'devtools'
* removing 'C:/Program Files/R/R-4.1.3/library/devtools' Warning in install.packages :   installation of package ‘devtools’ had non-zero
exit status

I tried to install the package without success. I did not find a guide on the Internet that solved my problem

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
tom
  • 1
  • 3
    You need to install Rtools, have you tried to do so? – Arcoutte Jan 24 '23 at 12:49
  • 2
    Do heed the all-caps "WARNING" at the beginning of your error message. As for the error message later on, it usually helps to restart R. And make sure that [you are not accidentally saving the current R session](https://stackoverflow.com/a/57590056/1968) — doing this creates problems, and is *never* good (but unfortunately easy to do by accident). – Konrad Rudolph Jan 24 '23 at 12:54
  • I have the most up to date version of R but when I try to install rtools i get this message: install.packages("Rtools") WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: https://cran.rstudio.com/bin/windows/Rtools/ Warning in install.packages : package ‘Rtools’ is not available for this version of R – tom Jan 24 '23 at 12:56
  • 1
    @tom Again, do actually read the message. Rtools isn’t an *R package*, so you cannot install it via `install.packages`. If you *follow the link* in the message you will find an explanation how to install it. – Konrad Rudolph Jan 24 '23 at 13:02
  • Hi, I downloaded it from the website as it said, but have no clue what to do with it. And still, the warning message didn't change. was I supposed to download it to a specific folder? thanks, – tom Jan 24 '23 at 13:10
  • you download it and run the .exe to install it. – Paul Stafford Allen Jan 24 '23 at 13:26
  • of course it was installed on my computer, but the warning massage remain the same: "WARNING: Rtools is required to build R packages but is not currently installed." should I install it on a specific folder on my computer? or change something in the RSTUDIO settings? – tom Jan 24 '23 at 13:31
  • 1
    If you installed it to the default location `c:/rtools42` and then restart R/RStudio (completely), then R will find it in the `PATH`. If you installed it in a non-default location, R may still find it, but if not then reading the [docs for Rtools42](https://cran.rstudio.com/bin/windows/Rtools/rtools42/rtools.html) suggests setting the `R_CUSTOM_TOOLS_PATH` envvar to the new path. This needs to be done in windows; if you don't know how, search for "environment var" and set it there, then restart R and RStudio. – r2evans Jan 24 '23 at 14:19

0 Answers0