r - 'utils' 的 loadNamespace() 中的 onLoad 失败,详细信息
问题描述
我目前正在构建一个无发行版的R 映像(尽管我不精通 R)
我目前正在从https://cloud.r-project.org/bin/linux/debian/buster-cran35/为 amd64 架构提取 deb 包。
我可以从创建的图像交互地运行 R,但是,一些核心库没有正确加载,并且终端中有关故障原因的信息很少。
以下是运行以下命令的输出:R --verbose
'verbose' and 'quietly' are both true; being verbose then ..
now dyn.load("/usr/lib/R/library/methods/libs/methods.so") ...
R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
'verbose' and 'quietly' are both true; being verbose then ..
'verbose' and 'quietly' are both true; being verbose then ..
now dyn.load("/usr/lib/R/library/utils/libs/utils.so") ...
Garbage collection 1 = 0+0+1 (level 2) ...
12.0 Mbytes of cons cells used (35%)
3.1 Mbytes of vectors used (5%)
Error: package or namespace load failed for 'utils':
.onLoad failed in loadNamespace() for 'utils', details:
call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)
error: error in running command
'verbose' and 'quietly' are both true; being verbose then ..
now dyn.load("/usr/lib/R/library/grDevices/libs/grDevices.so") ...
'verbose' and 'quietly' are both true; being verbose then ..
now dyn.load("/usr/lib/R/library/graphics/libs/graphics.so") ...
'verbose' and 'quietly' are both true; being verbose then ..
shared object ''utils.so'' already loaded
Error: package or namespace load failed for 'stats':
.onLoad failed in loadNamespace() for 'utils', details:
call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)
error: error in running command
utils.so 的所有依赖库都可以通过 ldd 命令找到。
ldd utils.so 链接命令的输出:
/ # ldd /usr/lib/R/library/utils/libs/utils.so
linux-vdso.so.1 (0x00007ffe772f9000)
libR.so => /usr/lib/libR.so (0x00007f127acdf000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f127ab1e000)
libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007f127aac3000)
libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f127a855000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f127a6d2000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f127a690000)
libreadline.so.7 => /lib/x86_64-linux-gnu/libreadline.so.7 (0x00007f127a441000)
libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f127a3bc000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f127a348000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f127a320000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f127a30d000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f127a0ef000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f127a0e3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f127a0de000)
libicuuc.so.63 => /usr/lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f1279f0f000)
libicui18n.so.63 => /usr/lib/x86_64-linux-gnu/libicui18n.so.63 (0x00007f1279c34000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f1279c03000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1279be2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f127b17f000)
libopenblas.so.0 => /usr/lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007f12779fc000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f12779e2000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f12779b4000)
libicudata.so.63 => /usr/lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f1275fc4000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1275e40000)
我在这里可能缺少什么?
"utils.so" already loaded
可能表明什么?
解决方案
我认为您缺少“哪个”。
在这个代码块system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)
中,which
是一个来自的对象Sys.which
,它的值是字符串“/usr/bin/which”。
您应该尝试安装which
.
推荐阅读
- javascript - body onload 在同一页面上看不到js函数
- angular - 是否可以在 Angular 中将 OpenCV.js 与 Web Worker 一起使用?
- c++ - std::wcout 打印 unicode 字符,但它们是隐藏的
- unix - 仅当它是数字时,如何对 Unix awk 命令返回的列执行操作?
- powershell - 使用 powershell 脚本替换整个 json 对象
- r - 有条件地运行语句
- php - 用几个引号更新mysql(json)(不希望数据库中的转义字符)
- java - 如何计算两个 3d 向量之间的俯仰角
- javascript - 在 React 中构建 Modal 组件而不将其嵌套在调用者组件中
- swift - 如何创建一个带有输入的闭包结构参数,在 SwiftUI 中返回“some View”而不是“AnyView”?