我正在尝试在通过 Web 浏览器访问的 RStudio 服务器上安装 e1071 软件包。 这是我得到的错误:
> install.packages("e1071")
Installing package(s) into ‘/home/mc/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.nexr.com/src/contrib/e1071_1.6-1.tar.gz'
Content type 'application/x-gzip' length 258910 bytes (252 Kb)
opened URL
==================================================
downloaded 252 Kb
The downloaded source packages are in
‘/tmp/Rtmp3a2DZB/downloaded_packages’
Error in system(paste(which, i), intern = TRUE, ignore.stderr = TRUE) :
cannot popen '/usr/bin/which pdflatex 2>/dev/null', probable reason 'Cannot allocate memory'
有时当我尝试此操作时,我没有收到错误消息,但 e1071 软件包仍然没有出现在软件包列表中。
这是我的会话信息()
> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C
[4] LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] caret_5.15-045 cluster_1.14.3 reshape_0.8.4 plyr_1.8
[5] lattice_0.20-10 doMC_1.2.5 multicore_0.1-7 iterators_1.0.6
[9] foreach_1.4.0
loaded via a namespace (and not attached):
[1] codetools_0.2-8 grid_2.15.2 tools_2.15.2
有人可以帮忙吗?谢谢。
请注意,您可以只做
sudo apt-get install r-cran-e1071
除此之外,您的错误可能表明缺乏资源,可能是 RAM,也可能是缺少在本地构建软件包之前要安装的r-base-dev
。
编辑:我站正了。 这曾经作为一个一揽子计划存在,但后来似乎被撤回了。然而,它仍然在迈克尔的 ppa。
也许你可以重新启动你的RStudio服务器,通过
sudo rstudio-server restart