繁体   English   中英

共享 HPC 集群环境中的 R tcl 问题

[英]R tcl issue on shared HPC cluster environment

我在让 R 在我所在机构的共享集群上正常运行时遇到了一些问题,我没有 root 访问权限。 有些东西会起作用,但是当我需要安装包等时它会变得棘手。我试图解决的当前问题是在尝试加载插入符号包时出现以下错误:

Loading required package: lattice
Loading required package: ggplot2
Error: package or namespace load failed for ‘ggplot2’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/cifs/hariri-long/Scripts/Tools/R/packages/rlang/libs/rlang.so':
  /cifs/hariri-long/Scripts/Tools/R/packages/rlang/libs/rlang.so: undefined symbol: R_removeVarFromFrame
Error: package ‘ggplot2’ could not be loaded
Execution halted

我发现此页面建议我按如下方式安装 rlang:

> install.packages("rlang",type="source")
Installing package into ‘/cifs/hariri-long/Scripts/Tools/R/packages’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: Can't find a usable init.tcl in the following directories:
    /usr/share/tcl8.5 ./lib/tcl8.5 ./lib/tcl8.5 ./library ./library ./tcl8.5.13/library ./tcl8.5.13/library

但我得到上面的 tcl 错误。 因为我在其他线程中看到过这个:

> capabilities("tcltk")
tcltk
 TRUE

看起来我系统上的 tcl 是 8.6,但我不知道如何告诉 R 寻找那个版本。

$ whereis tcl
tcl: /usr/lib64/tcl8.6 /usr/include/tcl.h /usr/share/tcl8.6
$ which R
/opt/apps/rhel7/R-3.6.0/bin/R

有任何想法吗? 操作系统是 CentOS 8。谢谢!

我最终决定尝试使用更新的 R 版本 (4.1.1) 来解决这个问题。 一开始我很犹豫要不要这样做,因为我遇到了在更新的 R 版本中我需要的包的可用性/兼容性的问题,但我没有得到任何解决这个问题的方法。 我认为由于系统上安装了 TCL 8.6,更新版本的 R 可能可以使用它,而且我似乎是对的,因为我已经克服了切换时遇到的第一个错误。

我确实收到了有关加载共享库 Libtk8.6.so 的问题的新错误。 所以我从这里下载了 .so 文件并使用 rpm2cpio 将它解压到我的主目录(我没有 root 访问权限所以我不能只使用 yum install 等)。 在那之后,我只需要为新的 R 版本重新安装我的所有软件包就可以了!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM