r - rstudio 的 Ubuntu 内存问题
问题描述
您好,我遇到了一个问题,即在加载一些对象后,我无法执行任何类型的系统调用。我注意到这一点,因为即使是我的 pdf 渲染也不起作用。
例如
> sessionInfo()
Error in system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE) :
cannot popen '/usr/bin/which 'uname' 2>/dev/null', probable reason 'Cannot allocate memory'
当我尝试 knitr 时,它给了我一个类似的错误。但是我仍然有足够的内存,例如我可以加载一个巨大的 1GB 数据帧,它会运行良好。
我的 rstudio 会话如下:
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.0 htmltools_0.3.6 tools_3.5.0 yaml_2.2.0 Rcpp_1.0.1 rmarkdown_1.12 knitr_1.22 xfun_0.6 digest_0.6.18 evaluate_0.13
有什么建议么?
> Sys.which("uname")
Error in system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE) :
cannot popen '/usr/bin/which 'uname' 2>/dev/null', probable reason 'Cannot allocate memory'
> traceback()
4: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)
3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
2: suppressWarnings(system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE))
1: Sys.which("uname")
解决方案
推荐阅读
- java - Spring Boot 能够接受 Enum 作为请求参数
- android - 如何锁定 LTE_ONLY 模式?
- python - python中有一个函数可以检测曲线上的奇异点吗?
- java - 减少在微服务架构中使用 feign 调用
- c++ - 如何为 VxWorks 创建 CMake 交叉编译工具链?
- java - 如何找到与前 20 个数字相除的第一个数字?
- matlab - 索引/访问 MATLAB 嵌套结构
- python - redis如何使不同哈希中的密钥过期
- reactjs - 如何使用 Django-rest 和 React js 对用户进行身份验证
- google-sheets - 按周范围和行值查询数据