Problem with Backports 1.1.7
Closed this issue · 3 comments
Hi, I am trying to install Bbplot (plotting with the format of the BBC plots) but run into an error related to Backports. I have tried to remove backports, remove the 00LOCK-backports, installing the binary version and using the install type=source command but keep on getting this message.
- installing source package 'backports' ...
** package 'backports' successfully unpacked and MD5 sums checked
ERROR: cannot remove earlier installation, is it in use? - removing 'C:/Users/pepes/Documents/R/win-library/4.0/backports'
- restoring previous 'C:/Users/pepes/Documents/R/win-library/4.0/backports'
Error in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
(converted from warning) problem copying C:\Users\pepes\Documents\R\win-library\4.0\00LOCK-backports\backports\libs\x64\backports.dll to C:\Users\pepes\Documents\R\win-library\4.0\backports\libs\x64\backports.dll: Permission denied - removing 'C:/Users/pepes/Documents/R/win-library/4.0/backports'
- restoring previous 'C:/Users/pepes/Documents/R/win-library/4.0/backports'
Error in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
(converted from warning) problem copying C:\Users\pepes\Documents\R\win-library\4.0\00LOCK-backports\backports\libs\x64\backports.dll to C:\Users\pepes\Documents\R\win-library\4.0\backports\libs\x64\backports.dll: Permission denied
Execution halted
Error: Failed to install 'bbplot' from GitHub:
(converted from warning) installation of package ‘backports’ had non-zero exit status
This looks like a file system permission problem. Make sure you have the right to write to and modify files in C:\Users\pepes\Documents\R\win-library\4.0
, e.g. by removing the directory C:/Users/pepes/Documents/R/win-library/4.0/backports
.
I had a similar (perhaps exact same) problem trying to upgrade backports and fixed it by updating it in an R --vanilla
session. I think the problem is that my .Rprofile was loading the usethis package, which imports the rprojroot package, which uses backports in such a way that backports can't be installed or upgraded in the that session.
Edit: Probably it is better to use R --no-init-file
instead of R --vanilla
, since we just want to stop the user's .Rprofile file from being run
Thank you both so much! I updated in an R--vanilla session and it worked! Thanks a lot, Mike and Mllg for your help.