R CMD CHECK github action failing on MacOS: "Library not loaded: /opt/X11/lib/libX11.6.dylib"

I am using the standard R CMD CHECK template, and it has worked without any issues for all my other repositories. But it seems to fail for one my repos with the following error:

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Users/runner/work/_temp/Library/imager/libs/imager.so':
  dlopen(/Users/runner/work/_temp/Library/imager/libs/imager.so, 6): Library not loaded: /opt/X11/lib/libX11.6.dylib
  Referenced from: /Users/runner/work/_temp/Library/imager/libs/imager.so
  Reason: image not found
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted

The build log can be found here: https://github.com/IndrajeetPatil/kittyR/runs/1896884659

What can I change about my .yaml, so that it works?

Thanks.

The imager package requires X11.

So the same solution as here:

With slight modification:

      - name: Install XQuartz on macOS
        if: runner.os == 'macOS'
        run: brew install xquartz --cask

This topic was automatically closed 7 days after the last reply. 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.