无法在Ubuntu上的RStudio Server上安装e1071

时间:2012-12-18 15:40:47

标签: r installation rstudio-server

我正在尝试在我通过网络浏览器访问的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()

> 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   

有人可以帮忙吗?谢谢。

2 个答案:

答案 0 :(得分:3)

请注意,您可以这样做

sudo apt-get install r-cran-e1071

除此之外,您的错误可能表示在本地构建软件包之前缺少资源,可能还有RAM,可能还缺少r-base-dev

编辑:我的立场得到了纠正。这曾经作为一个包存在,但似乎后来被撤回。但它仍在Michael's ppa

答案 1 :(得分:2)

也许你可以通过

重启你的RStudio服务器
sudo rstudio-server restart