繁体   English   中英

如何在 RStudio 服务器中安装 R 包

[英]How to install R packages in RStudio Server

我将我的一台旧笔记本电脑转换为 Ubuntu 服务器 (18.04),我想将其用于文件共享和运行 RStudio 服务器。

我成功下载了 RStudio 服务器,并可以通过 Chrome 在我的新笔记本电脑上打开它。

我想下载 tidyverse(或只是 dplyr 和 stringr)来运行一些命令,但是当我执行install.packages("dplyr")时,我收到以下消息:

Installing package into ‘/home/jacobdavis95/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/dplyr_0.8.3.tar.gz'
Content type 'application/x-gzip' length 1173098 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

* installing *source* package ‘dplyr’ ...
** package ‘dplyr’ successfully unpacked and MD5 sums checked
** libs

跟着这行,重复了很多次

g++  -I/usr/share/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/home/jacobdavis95/R/x86_64-pc-linux-gnu-library/3.4/BH/include" -I"/home/jacobdavis95/R/x86_64-pc-linux-gnu-library/3.4/plogr/include" -I"/home/jacobdavis95/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o

最后

/tmp/cc3w1guR.s: Assembler messages:
/tmp/cc3w1guR.s: Fatal error: can't write 3924 bytes to section .debug_loc of mutate.o: 'No space left on device'
/tmp/cc3w1guR.s: Fatal error: can't close mutate.o: No space left on device
/usr/lib/R/etc/Makeconf:168: recipe for target 'mutate.o' failed
make: *** [mutate.o] Error 1
ERROR: compilation failed for package ‘dplyr’
* removing ‘/home/jacobdavis95/R/x86_64-pc-linux-gnu-library/3.4/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmplNsTeo/downloaded_packages’

我不明白其中一些消息是什么意思。 其中一行还说,“设备上没有剩余空间”这没有意义,因为它是一个 500 GB 的 SDD,几乎是空的。

我看过的大多数论坛/网站都不涉及 Ubuntu 服务器,只是 Ubuntu 桌面。 我确实尝试遵循https://www.r-bloggers.com/installing-rstudio-server-on-ubuntu-server/上的建议,但最终遇到了同样的问题。

以前有人遇到过这个问题吗? 我该如何解决这个问题?

无论出于何种原因,Ubuntu 服务器的初始安装存在问题,系统仅注册我在驱动器上有 4 GB。 结果,我重新安装了 Ubuntu 服务器并自行纠正,现在有足够的空间安装软件包。

您可以使用它来使用 apt package 管理器来安装 dplyr 和依赖项,而不是在任何 ubuntu 上(在 18.04 和 19 上为我工作):

sudo apt-get install r-cran-dplyr

暂无
暂无

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

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