0

I installed the last version of R and Rtools, then the last of Rstudio, but, when I try to install ggplot2, this warning is present

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

how is it possible? How can I solve it?

Thanks to all.

Pepus
  • 1
  • Did you run this? writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron") – Mohanasundaram May 12 '20 at 20:27
  • 2
    Install the binary package and not the source code, then you don't need Rtools. See the [CRAN Rtools page](https://cran.r-project.org/bin/windows/Rtools/) about changes in R 4.0 and Rtools and possibly [this SO post](https://stackoverflow.com/questions/61556412/error-message-when-installing-xml2-r-package/61565489). – tpetzoldt May 12 '20 at 20:36
  • Does this answer your question? [Error message when installing xml2 R package](https://stackoverflow.com/questions/61556412/error-message-when-installing-xml2-r-package) – tpetzoldt May 12 '20 at 20:41
  • @Mohanasundaram no, I didn't. I didn't understand very well the purpose, because I'm not very expert of R and related softwares. – Pepus May 13 '20 at 08:48
  • @tpetzoldt I tried to install the binary of ggplot2, but I received the same warning. I also received an error of permissions: my library is not writable. I used Rstudio in december and I didn't have any of these problems, after the installation of Rtools. – Pepus May 13 '20 at 08:49
  • @Nik: Note the difference between the system-wide library (C:\program files\R\.....) and your personal library `C:\users\\R\win-library` The first is write protected, the latter user writable. Sometimes, it can be a good idea to remove the personal library before an update. Make sure not to have own data in. Another good idea is to run `update.packages()` before installation of additional packages. – tpetzoldt May 13 '20 at 09:38
  • @tpetzoldt cannot open file 'C:/Users/Username/Documents/R/win-library/4.0/file39b843da19c/ggplot2/CITATION': Permission denied this is the message that I get when I try to install ggplot2 from CRAN default repository. I uninstalled R, Rtools and Rstudio, before the installation of new R, Rtools and Rstudio. I think this is very strange – Pepus May 13 '20 at 10:55
  • (1) close all files, programs and open windows, (2) Reboot computer (3) remove win-library/4.0 . Make sure to use the same user who installed the software and/or check windows permissions. – tpetzoldt May 13 '20 at 11:30

1 Answers1

0

I solved my issue: it was because of Bitdefender internet security, with its "safe files" protection, which blocked every changes on folders of its list. I gave authorizations and now it's ok.

Thanks to all.

Pepus
  • 1