Skip to content

unknown archive type error on macOS #915

Open

Description

@eitsupi

I saw this on GitHub actions in pola-rs/r-polars#1884:
https://github.com/pola-rs/r-polars/actions/runs/35546233480/job/106172535861?pr=1884#step:6:14584

    ℹ Installing lockfile '.github/pkg.lock'
     
    → Package library at '/Users/runner/work/_temp/Library'.
    → Will install 10 packages.
    → Will download 10 packages with unknown size.
    + base64enc   0.1-6  🔧 ⬇
    + diffobj     0.3.9  🔧 ⬇
    + knitr       1.52    ⬇
    + pak         0.11.1 🔧 ⬇
    + tinytex     0.61    ⬇
    + usethis     3.2.2   ⬇
    + xfun        0.61   🔧 ⬇
      
    ℹ Getting 7 pkgs with unknown sizes
    ✔ Cached copy of lattice 0.22-9 (aarch64-apple-darwin23) is the latest build
    ✔ Cached copy of Matrix 1.7-5 (aarch64-apple-darwin23) is the latest build
    ✔ Got base64enc 0.1-6 (aarch64-apple-darwin23) (38.77 kB)
    ✔ Got tinytex 0.61 (aarch64-apple-darwin23) (150.42 kB)
    ✔ Got xfun 0.61 (aarch64-apple-darwin23) (656.51 kB)
    ✔ Got knitr 1.52 (aarch64-apple-darwin23) (992.43 kB)
    ✔ Got diffobj 0.3.9 (aarch64-apple-darwin23) (1.01 MB)
    ✔ Got usethis 3.2.2 (aarch64-apple-darwin23) (954.92 kB)
    ✔ Got pak 0.11.1 (aarch64-apple-darwin23) (7.43 MB)
    ✔ Installed base64enc 0.1-6  (31ms)
    Error: 
    ! error in pak subprocess
    Caused by error in `make_install_process(filename, lib = lib, metadata = metadata)`:
    ! Cannot extract
    '/var/folders/36/tjdph2t965j8snz9_vkdnw0r0000gn/T//RtmpQTZorp/file52328a60a67/bin/macosx/sonoma-arm64/contrib/4.6/knitr_1.52.tgz',
    unknown archive type.

Activity

  1. eliotmcintire commented on Sep 21, 2026

    @eliotmcintire
    Contributor

    We hit the same thing across several repos, and I think the cause is the compression of the file, not the download.

    CRAN has started serving some newly built macOS binaries zstd-compressed. From https://cran.rstudio.com/bin/macosx/sonoma-arm64/contrib/4.6/:

    • knitr_1.52.tgz and terra_1.9-50.tgz start with 28 b5 2f fd (Zstandard; file says "Zstandard compressed data").
    • An older build, jsonlite_2.0.0.tgz, starts with 1f 8b (gzip).

    detect_package_archive_type() in pkgdepends (R/install-tar.R) recognises gzip, bzip2 and xz, so these fall through to "unknown" and make_install_process() stops with "unknown archive type". In a sample of 40 files from that directory's PACKAGES, 1 was zstd, so it should spread as packages are rebuilt.

    Workaround that works for us on GitHub Actions: use-public-rspm: always in r-lib/actions/setup-r (with true, macOS only gets Package Manager for a few orgs). Posit Package Manager serves the same versions as gzip; terra 1.9-50 then installs from it.

  2. gaborcsardi commented on Sep 21, 2026

    @gaborcsardi
    Member

    Apparently this is a CRAN bug:
    https://stat.ethz.ch/pipermail/r-sig-mac/2026-September/015389.html

    Nevertheless I am going to switch over the default to PPM on macOS as well, as it seems to we working well and it also fixes this issue.

  3. gaborcsardi commented on Sep 21, 2026

    @gaborcsardi
    Member

    First reported here, just to link things up: r-lib/pkgdepends#485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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