I am not sure if this is a bug, but not having worked with renv before when running the setup_renv script, I got an error message that the installed version of renv does not match the version configured in the project. Maybe this applies to others as well? (I installed the packages manually now to be sure).
After running renv::restore(packages = "renv") as suggested in the error message, I got the following warnings when installing the packages via renv:
Querying repositories for available source packages ... Done!
Retrieving 'https://cran.rstudio.com/src/contrib/Archive/cli/cli_3.6.1.tar.gz' ...
OK [downloaded 554 Kb in 0.2 secs]
Retrieving 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/curl_5.2.1.tgz' ...
OK [downloaded 794.5 Kb in 0.2 secs]
Retrieving 'https://mran.microsoft.com/snapshot/2023-11-07/bin/macosx/big-sur-arm64/contrib/4.3/lifecycle_1.0.3.tgz' ...
Retrieving 'https://cran.rstudio.com/src/contrib/Archive/lifecycle/lifecycle_1.0.3.tar.gz' ...
OK [downloaded 104.3 Kb in 0.3 secs]
Retrieving 'https://mran.microsoft.com/snapshot/2023-11-06/bin/macosx/big-sur-arm64/contrib/4.3/rlang_1.1.1.tgz' ...
Warning: failed to find binary for 'lifecycle 1.0.3' in package repositories
Warning: failed to retrieve 'https://mran.microsoft.com/snapshot/2023-11-07/bin/macosx/big-sur-arm64/contrib/4.3/lifecycle_1.0.3.tgz' [error code 6]
Warning: failed to find source for 'lifecycle 1.0.3' in package repositories
Warning: failed to find binary for 'rlang 1.1.1' in package repositories
Warning: failed to retrieve 'https://mran.microsoft.com/snapshot/2023-11-06/bin/macosx/big-sur-arm64/contrib/4.3/rlang_1.1.1.tgz' [error code 6]
Error: failed to retrieve package 'lifecycle@1.0.3'
In addition: Warning messages:
1: curl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.com
2: failed to retrieve 'https://mran.microsoft.com/snapshot/2023-12-06/bin/macosx/big-sur-arm64/contrib/4.3/cli_3.6.1.tgz' [error code 6]
3: curl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.com
4: failed to retrieve 'https://mran.microsoft.com/snapshot/2023-11-07/bin/macosx/big-sur-arm64/contrib/4.3/lifecycle_1.0.3.tgz' [error code 6]
5: curl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.com
Traceback (most recent calls last):
12: renv::restore() at #2
11: records <- renv_restore_run_actions(project, diff, current, lockfile, rebuild) at restore.R#160
10: records <- retrieve(packages) at restore.R#187
9: for (package in packages)
handler(package, renv_retrieve_impl(package)) at retrieve.R#33
8: for (package in packages)
handler(package, renv_retrieve_impl(package)) at retrieve.R#33
7: if (renv_cache_package_validate(path))
return(renv_retrieve_successful(record, path)) at retrieve.R#152
6: if (state$recursive)
for (package in unique(deps$Package))
retrieve(package) at retrieve.R#991
5: for (package in packages)
handler(package, renv_retrieve_impl(package)) at retrieve.R#33
4: for (package in packages)
handler(package, renv_retrieve_impl(package)) at retrieve.R#33
3: switch(source,
bioconductor = renv_retrieve_bioconductor(record),
bitbucket = renv_retrieve_bitbucket(record),
git = renv_retrieve_git(record),
github = renv_retrieve_github(record),
gitlab = renv_retrieve_gitlab(record),
repository = renv_retrieve_repos(record),
url = renv_retrieve_url(record),
renv_retrieve_unknown_source(record)
) at retrieve.R#208
2: stopf("failed to retrieve package '%s'", renv_record_format_remote(record)) at retrieve.R#635
1: stop(sprintf(fmt, ...), call. = call.) at utils-format.R#13
I am not sure if this is a bug, but not having worked with renv before when running the setup_renv script, I got an error message that the installed version of renv does not match the version configured in the project. Maybe this applies to others as well? (I installed the packages manually now to be sure).
After running renv::restore(packages = "renv") as suggested in the error message, I got the following warnings when installing the packages via renv: