2

我的包的依赖项之一是 rgl 包。当我尝试使用配置通过 Github Actions 进行 R-CMD 检查时

- {os: macOS-latest, r: 'release'}

通过设置

usethis::use_github_action_check_standard()

我遇到了 rgl 包的问题(Windows 没有问题)。确切的错误信息是:

Error in dyn.load(dynlib <- getDynlib(dir)) : 
  unable to load shared object '/Users/runner/work/_temp/Library/rgl/libs/rgl.so':
  dlopen(/Users/runner/work/_temp/Library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
  Referenced from: /Users/runner/work/_temp/Library/rgl/libs/rgl.so
  Reason: image not found
Warning: Warning:   Loading rgl's DLL failed. 
    This build of rgl depends on XQuartz, which failed to load.
 See the discussion in https://stackoverflow.com/a/66127391/2554330
Warning: Warning: Trying without OpenGL...
ERROR: lazy loading failed for package ‘mzRAPP’
* removing ‘/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/Rtmptc3xyB/Rinstc214f95c76f/mzRAPP’
      -----------------------------------
ERROR: package installation failed
Error: Error in proc$get_built_file() : Build process failed
Calls: <Anonymous> ... build_package -> with_envvar -> force -> <Anonymous>
Execution halted
Error: Process completed with exit code 1.

这已经与在 R、Mac OSX El Captian和Package rgl in R not loading in Mac OS中安装“rgl”包中的不同解决方案一起报告。但是,我看不出如何将这些解决方案用于 Githubs Actions R-CMD-check。有谁知道如何做到这一点?

4

1 回答 1

3

解决方案是RGL_USE_NULL: trueenv:部分中设置,.. 感谢@user2554330(R 中的 Package rgl 未在 Mac OS 中加载

于 2021-03-30T20:39:21.370 回答