Fedora 24上的libicu和stringi导致R头痛 [英] libicu and stringi on Fedora 24 causing R headaches
问题描述
我最近升级到F24,现在在我的R会话中,我无法加载几个软件包,sp. reshape2,latex2exp,knitr等.
I recently upgraded to F24, and now in my R session I cannot get a few packages to load, sp. reshape2, latex2exp, knitr, and others.
我发现的最初问题是F24使用libicu56,而这些软件包期望使用libicu54.我在此线程中提出了一个建议,以设置具有所需版本的符号链接:
The initial problem I found was that F24 uses libicu56 whereas these packages expect libicu54. I followed a suggestion in this thread to set the symbolic links with the desired version:
ln -s /usr/lib64/libicui18n.so.56 /usr/lib64/libicui18n.so.54
ln -s /usr/lib64/libicuuc.so.56 /usr/lib64/libicuuc.so.54
ln -s /usr/lib64/libicudata.so.56 /usr/lib64/libicudata.so.54
最初的错误消失了,但是现在我有了:
That initial error went away, but now I have this:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/uname/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so':
/home/uname/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so: undefined symbol: _ZTIN6icu_548ByteSinkE
这将我引向R的stringi程序包,但我无法加载它-它给出了相同的错误.
This leads me to the stringi package for R, but I cannot get it to load - it gives the same error.
我已经更新了F24和所有R软件包.
I have updated F24 and all the R packages as well.
有什么想法吗?
推荐答案
在更新icu(Gentoo)之后,这种情况刚刚发生在我身上.另一个解决方案是删除并重新安装stringi,因为它正在寻找不再存在的特定库文件.
That just happened to me following an update of icu (Gentoo). Another solution is to remove and install again stringi, as it is looking for a specific library file that does not exist anymore.
remove.packages('stringi')
install.packages('stringi')
如果.Rprofile
触发library(stringi)
,则必须使用R --vanilla
启动会话才能执行此操作,否则它将继续失败.
If your .Rprofile
triggers library(stringi)
, then you must start a session using R --vanilla
in order to do this, else it will keep failing.
使用--disable-pkg-config
的其他解决方案也可以使用.它将使stringi自己构建icu,而不是依赖系统的(源文件附带了icu的副本).
The other solution with --disable-pkg-config
works as well. It will make stringi build icu for itself rather than rely on the system's (the source ships with a copy of icu).
这篇关于Fedora 24上的libicu和stringi导致R头痛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!