I am unable to install the dev version of purrr, even after restarting R/RStudio etc. I am pretty sure that the package is not in use when trying install it. Yet, I get this error. Anyone else experiencing something similar? Any help? Many thanks!
> devtools::install_github("tidyverse/purrr")
Using github PAT from envvar GITHUB_PAT
Initiating curl with CURL_SSL_BACKEND: openssl
Downloading GitHub repo tidyverse/purrr@HEAD
β checking for file 'C:\Users\Roland\AppData\Local\Temp\Rtmpa2YcUz\remotes1acc14ee61d6\tidyverse-purrr-7788b48/DESCRIPTION' (503ms)
β preparing 'purrr': (2.6s)
β checking DESCRIPTION meta-information ...
β cleaning src
β checking for LF line-endings in source and make files and shell scripts (412ms)
β checking for empty or unneeded directories
Removed empty directory 'purrr/man/macros'
β building 'purrr_0.9000.0.9000.tar.gz'
Warning: file 'purrr/cleanup' did not have execute permissions: corrected
Warning: file 'purrr/configure' did not have execute permissions: corrected
Installing package into βC:/Users/Roland/AppData/Local/R/win-library/4.2β
(as βlibβ is unspecified)
* installing *source* package 'purrr' ...
ERROR: cannot remove earlier installation, is it in use?
* removing 'C:/Users/Roland/AppData/Local/R/win-library/4.2/purrr'
* restoring previous 'C:/Users/Roland/AppData/Local/R/win-library/4.2/purrr'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\Users\Roland\AppData\Local\R\win-library\4.2\00LOCK-purrr\purrr\libs\x64\purrr.dll to C:\Users\Roland\AppData\Local\R\win-library\4.2\purrr\libs\x64\purrr.dll: Permission denied
Warning message:
In i.p(...) :
installation of package βC:/Users/Roland/AppData/Local/Temp/Rtmpa2YcUz/file1acc146e24cc/purrr_0.9000.0.9000.tar.gzβ had non-zero exit status
Many thanks for your reply. It's a riddle. No, there's nothing purrr-related in my .Rprofile.
When I remove the purrr folder and try to install directly the dev / github verision I get this error.
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'purrr'
Are you able to install the dev version (if you don't mind)?
Hello @zoowalk, no help from me because I see exactly the same.
I removed purrr in the indicated way and tried to install it with
devtools::install_github("tidyverse/purrr")
Then I got an error indicating that I did not have devtools installed yet.
When I did that I saw that it also installed dependency purrr .
(I reinstalled various times and at those later times I did not see purrr reinstalled
even when I had its folder removed).
As @HanOostdijk said, you're getting that error because you're (a) on windows and (b) trying to install purrr when it's already loaded in an R session. You'll need to restart R/RStudio (and close any other R/RStudio instances that you have open) and try again.
If you need more diagnostics, one options to is use pak, which should detect this problem and give you specific advice:
Ooooh, I just realise the problem is that devtools itself loads purrr (via usethis), so you will have to either use remotes or pak to install dev purrr on windows.