我的包的一个依赖项是rgl包。当我尝试使用config通过Github操作执行R-CMD-check时
- {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.
这已经在Installing "rgl" package in R, Mac OSX El Captian和Package rgl in R not loading in Mac OS中与不同的解决方案一起报告了。然而,我不明白如何将这些解决方案调整为Githubs操作R-CMD-check。有谁知道如何做到这一点吗?
发布于 2021-03-31 04:39:21
解决方案是在env:
部分中设置RGL_USE_NULL: true
。感谢@user2554330 (Package rgl in R not loading in Mac OS)
https://stackoverflow.com/questions/66876670
复制相似问题