Skip to content

pak fails to install specific version; remotes succeeds #703

@johnbaums

Description

@johnbaums

pak fails to install terra 1.6.47 with error "terra@1.6.47: Conflicts with terra@1.6.47", but the specified version installs fine using remotes. Also tested on macOS (Sonoma) running R 4.4.1.

Is pak failing due to a conflict between multiple repositories hosting the same package?

pak::pkg_install("terra@1.6.47")
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#>
#> Error: ! error in pak subprocess
#> Caused by error:
#> ! Could not solve package dependencies:
#> * terra@1.6.47: Conflicts with terra@1.6.47
packageVersion("terra")
#> Error in packageVersion("terra"): there is no package called 'terra'
options("repos")
#> $repos
#>                                                              P3M
#> "https://packagemanager.posit.co/cran/__linux__/bullseye/latest"
#>                                                             CRAN
#>                                    "https://cloud.r-project.org"

Created on 2024-10-10 with reprex v2.1.1

Session info
sessionInfo()
#> R version 4.2.1 (2022-06-23)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Debian GNU/Linux 11 (bullseye)
#>
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.13.so
#>
#> locale:
#>  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8
#>  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8
#>  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C
#> [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base
#>
#> loaded via a namespace (and not attached):
#>  [1] pak_0.8.0         digest_0.6.37     withr_3.0.1       lifecycle_1.0.4
#>  [5] reprex_2.1.1      evaluate_1.0.0    rlang_1.1.4       cli_3.6.3
#>  [9] fs_1.6.4          rmarkdown_2.28    tools_4.2.1       glue_1.8.0
#> [13] xfun_0.48         yaml_2.3.10       fastmap_1.2.0     compiler_4.2.1
#> [17] htmltools_0.5.8.1 knitr_1.48

and with remotes:

remotes::install_version("terra", "1.6.47", upgrade = FALSE)
#> Trying https://packagemanager.posit.co/cran/__linux__/bullseye/latest
#> Downloading package from url: https://packagemanager.posit.co/cran/__linux__/bullseye/latest/src/contrib/Archive/terra/terra_1.6-47.tar.gz
#> Installing 1 packages: Rcpp
#> Installing package into '/root/R/x86_64-pc-linux-gnu-library/4.2'
#> (as 'lib' is unspecified)
#> Installing package into '/root/R/x86_64-pc-linux-gnu-library/4.2'
#> (as 'lib' is unspecified)
packageVersion("terra")
#> [1] '1.6.47'

Created on 2024-10-10 with reprex v2.1.1

Session info
sessionInfo()
#> R version 4.2.1 (2022-06-23)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Debian GNU/Linux 11 (bullseye)
#>
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.13.so
#>
#> locale:
#>  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8
#>  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8
#>  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C
#> [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base
#>
#> loaded via a namespace (and not attached):
#>  [1] digest_0.6.37     withr_3.0.1       lifecycle_1.0.4   reprex_2.1.1
#>  [5] evaluate_1.0.0    rlang_1.1.4       cli_3.6.3         remotes_2.5.0
#>  [9] fs_1.6.4          rmarkdown_2.28    tools_4.2.1       glue_1.8.0
#> [13] xfun_0.48         yaml_2.3.10       fastmap_1.2.0     compiler_4.2.1
#> [17] htmltools_0.5.8.1 knitr_1.48

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions