I already asked this over at sf, see r-spatial/sf#2588, but it was closed with being a problem of renv. So the same issue again here:
Error: failed to retrieve package 'sf@1.0-14'
I don't know anything about R packaging, so the output is confusing to me....
It says sf is downloaded but later fails that it cannot retrieve the package?
> renv::install('sf@1.0-14', type='source')
# Downloading packages -------------------------------------------------------
- Downloading sf from Repository ... OK [3.4 Mb in 0.62s]
- Downloading classInt from CRAN ... OK [432.8 Kb in 0.54s]
- Downloading e1071 from CRAN ... OK [308.7 Kb in 0.56s]
- Downloading class from CRAN ... OK [21.7 Kb in 0.54s]
Warning: failed to find source for 'sf 1.0-14' in package repositories
Error: failed to retrieve package 'sf@1.0-14'
Traceback (most recent calls last):
7: renv::install("sf@1.0-14", rebuild = TRUE, type = "source")
6: retrieve(packages)
5: handler(package, renv_retrieve_impl(package))
4: renv_retrieve_impl(package)
3: renv_retrieve_repos(record)
2: stopf("failed to retrieve package '%s'", renv_record_format_remote(record))
1: stop(sprintf(fmt, ...), call. = call.)
I also tried
renv::install("sf@1.0-14", type = "source", repos = "https://cran.r-project.org")
because in the renv.lock I see
"Repositories": [
{
"Name": "CRAN",
"URL": "https://packagemanager.posit.co/cran/latest"
}
]
but it fails with the same error.
I checked https://cran.r-project.org/src/contrib/Archive/sf/ for sf_1.0-14.tar.gz which exists.
So does this mean that sf_1.0-14.tar.gz is incomplete?
I tried using pak backend where the error indicated that MASS was missing.
Retrying the renv only (not using the pak backend) install via
renv::install('MASS@7.3-60.0.1') # as required by renv.lock
and then retrying
renv::install('sf@1.0-14', type='source')
works as expected (up to renv::install not respecting renv.lock where I opened a separate issue #2232)
I already asked this over at
sf, see r-spatial/sf#2588, but it was closed with being a problem ofrenv. So the same issue again here:I don't know anything about R packaging, so the output is confusing to me....
It says
sfis downloaded but later fails that it cannot retrieve the package?I also tried
because in the
renv.lockI seebut it fails with the same error.
I checked
https://cran.r-project.org/src/contrib/Archive/sf/forsf_1.0-14.tar.gzwhich exists.So does this mean that
sf_1.0-14.tar.gzis incomplete?I tried using
pakbackend where the error indicated thatMASSwas missing.Retrying the
renvonly (not using thepakbackend) install viaand then retrying
works as expected (up to
renv::installnot respectingrenv.lockwhere I opened a separate issue #2232)