Skip to content

Error: failed to retrieve package 'sf@1.0-14' #2233

@skwde

Description

@skwde

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions