Github Actions failing for MacOS - Cannot install packages

Hi folks,

I recently set up a Github action to run R CMD check using use_this::use_github_standard().

The package passes for Windows and Ubuntu, but fails for macOS-latest (release) with the error (link here):

Error: Error: <callr_remote_error: Cannot install packages:
  * MASS: Needs R >= 4.3>
   in process 1740 
  <simpleError: Cannot install packages:
  * MASS: Needs R >= 4.3>

I don't use the MASS package explicitly, so I assume it is a dependency of another package I import. I checked and the MASS package requires R(>=3.3.0), NOT R >= 4.3.
(Also: the most recent version of R is R-4.2.0. I am using R 4.1.1.)

After some googling I tried adding different versions of the following to my workflow:

      - name: Install X11 dependencies on MacOS
        if: runner.os == 'macOS'
        run: |
          brew install --cask xquartz

But the check still failed.

The workflow I am using is here.

Thoughts/suggestions welcome!

This is a known issue: `MASS` requires `>= 4.3` (which seems _unlikely_) · Issue #393 · r-lib/pak · GitHub

Ah good to know this is a known error - thank you!

Is there a way to modify my R-CMD-check.yaml file so that the R CMD check doesn't fail for MacOS?
I see that you suggested


as a workaround for a similar issue, but I'm not sure where that would go in my package.

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.