This may be more of a pkgdepends issue, but maybe also some of pak. We hit this error installing via pak first:
# * curl: ! pkgdepends resolution error for curl.
# Caused by error:
# ! package must be a character vector without NAs
# Type .Last.error to see the more details.
I don't know what exactly reproduces this error, but we're seeing it in various repo setups that have custom packages added to them. For example, here's a setup with a CRAN repo and another repo local with custom packages - there are just a handful of old CRAN packages in there. When installing any package from these two repos, pak fails, but install.packages() works fine.
options(repos = c(
CRAN = "https://cloud.r-project.org",
local = "https://solo.packagemanager.posit.co/local/latest"
))
pak::pkg_install("curl")
# ✔ Updated metadata database: 3.17 MB in 8 files.
# ✖ Updating metadata database ... failed
# Error:
# ! error in pak subprocess
# Caused by error:
# ! Could not solve package dependencies:
# * curl: ! pkgdepends resolution error for curl.
# Caused by error:
# ! package must be a character vector without NAs
# Type .Last.error to see the more details.
There is something in the local repo that causes the dependency resolution to fail. I trial-and-error narrowed it down to just these two packages, but can't tell why.
Package: curl
Version: 3.3
Depends: R (>= 3.0.0)
Suggests: spelling, testthat (>= 1.0.0), knitr, jsonlite, rmarkdown, magrittr, httpuv (>= 1.4.4), webutils
NeedsCompilation: yes
License: MIT + file LICENSE
SystemRequirements: libcurl: libcurl-devel (rpm) or
libcurl4-openssl-dev (deb).
Package: plumber
Version: 0.4.6
Depends: R (>= 3.0.0)
Imports: R6 (>= 2.0.0), stringi (>= 0.3.0), jsonlite (>= 0.9.16), httpuv (>= 1.2.3), crayon
Suggests: testthat (>= 0.11.0), XML, rmarkdown, PKI, base64enc, htmlwidgets, visNetwork, analogsea
NeedsCompilation: no
License: MIT + file LICENSE
Repro from pkgdepends:
options(repos = c(
CRAN = "https://cloud.r-project.org",
local = "https://solo.packagemanager.posit.co/local/latest"
))
pd <- pkgdepends::new_pkg_deps("plumber")
pd$solve()
# ✔ Updated metadata database: 2.88 MB in 3 files.
# ✖ Updating metadata database ... failed
pd$get_resolution()$error
# [[1]]
# <async_rejected/rlib_error_3_0/rlib_error/error>
# Error in `value[[3L]](cond)`:
# ! pkgdepends resolution error for plumber.
# Caused by error:
# ! package must be a character vector without NAs
Besides the failure, I wonder if pak or pkgdepends could show a better error message here once we figure out the root cause?
This may be more of a pkgdepends issue, but maybe also some of pak. We hit this error installing via pak first:
I don't know what exactly reproduces this error, but we're seeing it in various repo setups that have custom packages added to them. For example, here's a setup with a CRAN repo and another repo
localwith custom packages - there are just a handful of old CRAN packages in there. When installing any package from these two repos, pak fails, butinstall.packages()works fine.There is something in the
localrepo that causes the dependency resolution to fail. I trial-and-error narrowed it down to just these two packages, but can't tell why.Repro from pkgdepends:
Besides the failure, I wonder if pak or pkgdepends could show a better error message here once we figure out the root cause?