Can't install dev version of purrr

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

Maybe you use purrr in .Rprofile?
To be really sure that purrr is not in use:

  • exit all R sessions
  • remove the folder purrr from your library folder
  • restart you R session and do again the installation of purrr

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

Trying to install the development versie with

devtools::install_github("tidyverse/purrr")

I get the same error as you.

It looks like a bug to me in devtools or purrr .
Maybe report it in https://github.com/tidyverse/purrr/issues ?

1 Like

Many thanks for giving it a try! Will file an issue.

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:

install.packages("pak")
pak::pak("tidyverse/purrrr")

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.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.