setup-r-dependencies unable to install pak

I'm seeing the following issue when trying to use the setup-r-dependencies@v2 github action:

Run # Install pak
  # Install pak
  echo "::group::Install pak"
  if which sudo >/dev/null; then SUDO="sudo -E --preserve-env=PATH env"; else SUDO=""; fi
  $SUDO R -q -e 'dir.create(Sys.getenv("R_LIB_FOR_PAK"), recursive = TRUE, showWarnings = FALSE)'
  $SUDO R -q -e 'install.packages("pak", repos = "", lib = Sys.getenv("R_LIB_FOR_PAK"))'
  echo "::endgroup::"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
    R_LIBS_USER: /home/runner/work/_temp/Library
    TZ: UTC
    NOT_CRAN: true
    R_LIBS_SITE: /opt/R/4.1.3/lib/R/site-library
    R_LIB_FOR_PAK: /opt/R/4.1.3/lib/R/site-library
Install pak
  > dir.create(Sys.getenv("R_LIB_FOR_PAK"), recursive = TRUE, showWarnings = FALSE)
  > install.packages("pak", repos = "", lib = Sys.getenv("R_LIB_FOR_PAK"))
  Warning: Warning: unable to access index for repository
    cannot open URL ''
  Warning message:
  package ‘pak’ is not available for this version of R

Here is the github action upto the point of failure:

    name: Publish to Artifactory
    runs-on: ubuntu-latest
      - name: Install Required Ubuntu Packages
        run: |
          sudo apt-get update -qq && sudo apt-get -y --no-install-recommends install \
          wget \
          libcurl4-openssl-dev \
          gdebi-core \
          libbz2-dev \
          xzdec \

      - name: Repo Checkout
        uses: actions/checkout@v3

      - name: Setup R
        uses: r-lib/actions/setup-r@v2
          r-version: '4.1.3'

      - name: Setup R Dependencies
        uses: r-lib/actions/setup-r-dependencies@v2
          cache-version: 2

I've tried a few different r-versions v4.2.2, v4.2, and this one v4.1.3 and they're all failing with the same error I posted above.

Something I noticed was that there was a push to this action yesterday modifying the required R version:

However I'm working with the constraints described and I'm not even sure this has been released yet. I only bring this up because yesterday these builds were proceeding with this action just fine. So I can't understand what else has changed here to cause this R version issue.

See here: setup-r-dependencies@v2 seems unable to install pak · Issue #750 · r-lib/actions · GitHub

This topic was automatically closed after 45 days. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.