Skip to content

pak install fails when Bioconductor is inaccessible even if CRAN is #726

@Moohan

Description

@Moohan

Our corporate network is restrictive; for some reason, http://bioconductor.org/config.yaml seems inaccessible from RStudio. Unfortunately, this prevents pak from installing packages from CRAN, even if I specifically ask it to. This seems like a bug.

pak::pak()
#> Error: ! error in pak subprocess
#> Caused by error in `find_package_root(path = root)`:
#> ! Could not find R package in `.` or its parent directories.

pak::pak("testthat")
#> Error: ! error in pak subprocess
#> Caused by error in `download.file(url, tmp, quiet = TRUE)`:
#> ! cannot open URL 'http://bioconductor.org/config.yaml'

pak::pak("cran::testthat")
#> Error: ! error in pak subprocess
#> Caused by error in `download.file(url, tmp, quiet = TRUE)`:
#> ! cannot open URL 'http://bioconductor.org/config.yaml'

install.packages("testthat")
#> Installing package into 'C:/Users/USER/AppData/Local/R/win-library/4.4'
#> (as 'lib' is unspecified)
#> also installing the dependencies 'pkgbuild', 'diffobj', 'brio', 'pkgload', 'praise', 'waldo'
#> 
#>   There is a binary version available but the source version is later:
#>           binary source needs_compilation
#> testthat 3.2.1.1  3.2.2              TRUE
#> 
#> package 'pkgbuild' successfully unpacked and MD5 sums checked
#> package 'diffobj' successfully unpacked and MD5 sums checked
#> package 'brio' successfully unpacked and MD5 sums checked
#> package 'pkgload' successfully unpacked and MD5 sums checked
#> package 'praise' successfully unpacked and MD5 sums checked
#> package 'waldo' successfully unpacked and MD5 sums checked
#> 
#> The downloaded binary packages are in
#>  C:\Users\USER\AppData\Local\Temp\RtmpkRdhAE\downloaded_packages
#> installing the source package 'testthat'

Created on 2024-12-17 with reprex v2.1.1

The expected behaviour would maybe be a warning / message about the unavailability of Bioconductor, and no message at all if a package is specified as cran::package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    reprexneeds a minimal reproducible example

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions