r - 在 macOS 上设置 rstudio-server

标签 r macos rstudio-server

我想在 iMac 上设置 rstudio-server,支持多用户和远程登录。我按照 INSTALL 中的步骤操作教程:我构建了源代码,设置了配置文件和 launchd 守护进程。起初,它工作正常,但一段时间后,我在绘图时收到这些警告/错误:

2022-06-09 08:02:29.438 rsession[3050:139329] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
2022-06-09 08:02:29.438 rsession[3050:139329] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
2022-06-09 08:02:29.438 rsession[3050:139329] XType: unable to make a connection to the font daemon!
2022-06-09 08:02:29.438 rsession[3050:139329] XType: XTFontStaticRegistry is enabled as fontd is not available.

然后我无法再进行绘图,除非重新启动 R 并重新运行我的代码。你知道可能是什么问题吗?打开 issue on the rstudio-server github 时我无法获得任何帮助因为 MacOS 并未得到官方支持。

我也在考虑通过 docker 运行 rstudio-server,但我找不到将用户命名空间从 macOS 映射到容器的好方法。

任何帮助或建议将不胜感激!

编辑:看来我能够通过启动 fontd 守护进程来解决这个问题:

sudo launchctl load -w /System/Library/LaunchAgents/com.apple.fontd.useragent.plist

最佳答案

这似乎是 MacOS 字体守护程序的问题,而不是 RStudio 本身的问题。

有人报告了类似的issue在 PhantomJS 上。重新启动为他们解决了这个问题。

This answer对于不同的版本报告了相同的错误,他们能够通过在钥匙串(keychain)中安装正确的“Apple 全局开发者关系认证机构”来解决该错误:

The one I had had an expiration date of February 2023. I deleted that one and went here, downloaded the one called "Worldwide Developer Relations - G3 (Expiring 02/20/2030 00:00:00 UTC)", then retried the build and it worked.

关于r - 在 macOS 上设置 rstudio-server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73160433/

相关文章:

r - 在 R 或 R Studio(服务器)中交互输入密码?

r - 当键列数不同时合并data.table

macos - 如何本地化 Apple 帮助手册

macos - 如何设置 PrologScript

python - 如何使用 IPython 作为我的 Emacs Python 解释器?

ubuntu - VPS 与 Ubuntu 20.04 : Cannot connect to Github

r - 拆分一个 rle 对象

r - 在 lapply 中的 data.table 中使用函数

r - 如何使用 xmlValue 制作长度节点的 xpathSApply 输出向量?

linux - 无法在 centos 中启动 rstudio,出现错误 "unable to connect to service"