-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
I'm running into the same problem described in #463, but haven't been able to resolve it with the advice there.
getOption("repos")
#> CRAN
#> "https://cran.rstudio.com/"
pak::pak("glue")
#> ✔ Updated metadata database: 7.11 MB in 4 files.
#> ✔ Updating metadata database ... done
#> Error: 3 deps for 1/1 pkgs [⠸] Resolving standard (CRAN/BioC) packages
#> ! error in pak subprocess
#> Caused by error in `readRDS(dbfile)`:
#> ! error reading from connection
#> Type .Last.error to see the more details.
.Last.error
#> <callr_error/rlib_error_3_0/rlib_error/error>
#> Error:
#> ! error in pak subprocess
#> Caused by error in `readRDS(dbfile)`:
#> ! error reading from connection
#> ---
#> Backtrace:
#> 1. pak::pak("glue")
#> 2. pak::pkg_install(pkg, ...)
#> 3. pak:::remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), …
#> 4. err$throw(res$error)
#> ---
#> Subprocess backtrace:
#> 1. base::withCallingHandlers(cli_message = function(msg) { …
#> 2. get("pkg_install_make_plan", asNamespace("pak"))(...)
#> 3. prop$solve()
#> 4. private$plan$solve(policy = private$policy)
#> 5. pkgdepends:::pkgplan_solve(self, private, match.arg(policy))
#> 6. self$resolve()
#> 7. pkgdepends:::pkgplan_resolve(self, private)
#> 8. pkgdepends:::synchronise(self$async_resolve())
#> 9. asNamespace("pkgcache")$synchronise(...)
#> 10. base::stop(priv$value)
#> 11. global (function (e) …I'm using rig to manage R installations, so the first thing I tried was this, but it gives the same error.
❯ rig system add-pak
[INFO] Installing pak for R 4.5-arm64
[INFO] > Installing package into ‘/Users/garrick/Library/R/arm64/4.5/library’
[INFO] > (as ‘lib’ is unspecified)
[INFO] > trying URL 'https://r-lib.github.io/p/pak/stable/mac.binary.big-sur-arm64/darwin20/aarch64/bin/macosx/big-sur-arm64/contrib/4.5/../../../../../../../../darwin20/aarch64/pak_0.9.0_R-4-5_aarch64-darwin20.tgz'
[INFO] > Content type 'application/octet-stream' length 6385685 bytes (6.1 MB)
[INFO] > ==================================================
[INFO] > downloaded 6.1 MB
[INFO] >
[INFO] >
[INFO] > The downloaded binary packages are in
[INFO] > /var/folders/yl/0xhq7c7n3z7_9hp1356kctbr0000gp/T//RtmpGYoVIY/downloaded_packages
~ via ®️ v4.5.1 on ☁️ (us-east-1)
❯ rig system fix-permissions
[INFO] Running `sudo` for changing system library permissions. This might need your password.
[INFO] Fixing permissions
~ via ®️ v4.5.1 on ☁️ (us-east-1)
❯ rig --version
RIG -- The R Installation Manager 0.7.1Cleaning the cache and metadata runs into issues in the first step, but metadata is cleaned up.
pak::cache_clean()
#> Error:
#> ! error in pak subprocess
#> Caused by error in `readRDS(dbfile)`:
#> ! error reading from connection
#> Type .Last.error to see the more details.
.Last.error
#> <callr_error/rlib_error_3_0/rlib_error/error>
#> Error:
#> ! error in pak subprocess
#> Caused by error in `readRDS(dbfile)`:
#> ! error reading from connection
#> ---
#> Backtrace:
#> 1. pak::cache_clean()
#> 2. pak:::remote(function(...) { …
#> 3. err$throw(res$error)
#> ---
#> Subprocess backtrace:
#> 1. base::withCallingHandlers(cli_message = function(msg) { …
#> 2. get("cache_clean_internal", asNamespace("pak"))(...)
#> 3. pkgcache::pkg_cache_delete_files()
#> 4. package_cache$new(cachepath)$delete(...)
#> 5. private$find_locked(..., .list = .list)
#> 6. base::readRDS(dbfile)
#> 7. base::.handleSimpleError(function (e) …
#> 8. global h(simpleError(msg, call))
pak::meta_clean()
#> ? Do you want to delete all package metadata (Y/n) y
#> ℹ Cleaning up cache directory /Users/garrick/Library/Caches/org.R-project.R/R/pkgcache/_metadata.Similarly, pkgcache::pkg_cache_delete_files() also throws.
pkgcache::pkg_cache_delete_files()
#> Error in readRDS(dbfile) : error reading from connection
#> Run `rlang::last_trace()` to see where the error occurred.
.Last.error
#> <callr_error/rlib_error_3_0/rlib_error/error>
#> Error:
#> ! error in pak subprocess
#> Caused by error in `readRDS(dbfile)`:
#> ! error reading from connection
#> ---
#> Backtrace:
#> 1. pak::cache_clean()
#> 2. pak:::remote(function(...) { …
#> 3. err$throw(res$error)
#> ---
#> Subprocess backtrace:
#> 1. base::withCallingHandlers(cli_message = function(msg) { …
#> 2. get("cache_clean_internal", asNamespace("pak"))(...)
#> 3. pkgcache::pkg_cache_delete_files()
#> 4. package_cache$new(cachepath)$delete(...)
#> 5. private$find_locked(..., .list = .list)
#> 6. base::readRDS(dbfile)
#> 7. base::.handleSimpleError(function (e) …
#> 8. global h(simpleError(msg, call))Oh, and here are the current package versions
> sessioninfo::package_info(c("pak", "pkgcache", "pkgdepends", "pkgload", "pkgbuild", "pkgconfig"))
package * version date (UTC) lib source
callr 3.7.6 2024-03-25 [1] CRAN (R 4.5.0)
cli 3.6.5 2025-04-23 [1] CRAN (R 4.5.0)
curl 7.0.0 2025-08-19 [1] CRAN (R 4.5.0)
desc 1.4.3 2023-12-10 [1] CRAN (R 4.5.0)
filelock 1.0.3 2023-12-11 [1] CRAN (R 4.5.0)
fs 1.6.6 2025-04-12 [1] CRAN (R 4.5.0)
glue 1.8.0 2024-09-30 [1] CRAN (R 4.5.0)
jsonlite 2.0.0 2025-03-27 [1] CRAN (R 4.5.0)
lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.5.0)
lpSolve 5.6.23 2024-12-14 [1] CRAN (R 4.5.0)
pak 0.9.0 2025-05-27 [1] local
pkgbuild 1.4.8 2025-05-26 [1] CRAN (R 4.5.0)
pkgcache 2.2.4 2025-05-26 [1] CRAN (R 4.5.0)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.5.0)
pkgdepends 0.9.0 2025-05-27 [1] CRAN (R 4.5.0)
pkgload 1.4.0 2024-06-28 [1] CRAN (R 4.5.0)
processx 3.8.6 2025-02-21 [1] CRAN (R 4.5.0)
ps 1.9.1 2025-04-12 [1] CRAN (R 4.5.0)
R6 2.6.1 2025-02-15 [1] CRAN (R 4.5.0)
rlang 1.1.6 2025-04-11 [1] CRAN (R 4.5.0)
rprojroot 2.1.1 2025-08-26 [1] CRAN (R 4.5.0)
withr 3.0.2 2024-10-28 [1] CRAN (R 4.5.0)
zip 2.3.3 2025-05-13 [1] CRAN (R 4.5.0)
[1] /Users/garrick/Library/R/arm64/4.5/library
[2] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior