r - R:找不到符号:_libintl_dgettext
问题描述
我在 OSX Mojave 中运行 R,并且在加载任何具有 mgcv 依赖项的包时出现以下错误;
library(Seurat)
Error: package or namespace load failed for ‘Seurat’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so':
dlopen(/Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so, 6): Symbol not found: _libintl_dgettext
Referenced from: /Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so
Expected in: /usr/local/Cellar/r/4.0.4_1/lib/R/lib/libR.dylib
in /Users/akh/Documents/R_lib_4/mgcv/libs/mgcv.so
我有一个 brew 安装的 gettext;
brew info gettext
gettext: stable 0.21 (bottled)
GNU internationalization (i18n) and localization (l10n) library
https://www.gnu.org/software/gettext/
/usr/local/Cellar/gettext/0.21 (1,959 files, 19MB) *
Poured from bottle on 2021-03-18 at 12:03:19
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gettext.rb
License: GPL-3.0-or-later
并包括 libintl.8.dylib
/usr/local/Cellar/gettext/0.21/lib/libintl.8.dylib
我不能完全确定原因的根源,我非常感谢任何解决此问题的意见。
R version 4.0.4 (2021-02-15) -- "Lost Library Book"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin18.7.0 (64-bit)
~ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G8022
解决方案
更新到 r 4.0.4_2 的最新 Brew 版本并摆脱 /Library/Frameworks/R.framework 解决了它。
推荐阅读
- javascript - 未找到 React 模块 - 如何在反应中导入模块
- html - 在 Django 视图和模板中执行一些算术后,我得到了错误的值
- python - 为什么在 __exit__ 函数中更改引用不起作用?
- laravel - Laravel 返回注册 ID
- ios - 不要在选项卡开关的导航中重新加载顶部视图中的内容
- c - C API 允许自动和分配的存储
- loops - Python:While循环索引超出范围
- node.js - multer保存文件后修改req.body
- javascript - 使用给定模式验证日期输入 - JS / React
- php - 向 array_map 中的 html_entity_decode 添加标志