I have a linux laptop with R 4.0.4
I was trying to update packages from CRAN and the update of renv from 0.12.5 to 0.13.0 failed with the message "Error: package or namespace load failed ". It failed a second attempt - so, not transient weirdness in the download.
I tried uninstalling and re-installing renv. That was probably a bad idea because the uninstall worked and the re-install failed.
I decided to cut my losses and install the development version from GitHub.
I am hoping that the problem will have gone away the next time the version of renv on CRAN is updated.
> remove.packages("renv", lib="~/R/x86_64-pc-linux-gnu-library/4.0")
> install.packages("renv")
Installing package into ‘/home/ross/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/renv_0.13.0.tar.gz'
Content type 'application/x-gzip' length 413734 bytes (404 KB)
==================================================
downloaded 404 KB
* installing *source* package ‘renv’ ...
** package ‘renv’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘renv’:
.onLoad failed in loadNamespace() for 'renv', details:
call: if (last %in% endings) return(TRUE)
error: argument is of length zero
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/ross/R/x86_64-pc-linux-gnu-library/4.0/renv’
Warning in install.packages :
installation of package ‘renv’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp4GzUP5/downloaded_packages’
> remotes::install_github("rstudio/renv")
Downloading GitHub repo rstudio/renv@HEAD
✓ checking for file ‘/tmp/Rtmp4GzUP5/remotes22c361c4c3be/rstudio-renv-1fc1e29/DESCRIPTION’ ...
─ preparing ‘renv’:
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘renv/tests/testthat/resources/dummy.Rmd’
─ building ‘renv_0.13.0-2.tar.gz’
Installing package into ‘/home/ross/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package ‘renv’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (renv)
>