【问题标题】:Cannot install e1071 on RStudio Server on Ubuntu无法在 Ubuntu 上的 RStudio 服务器上安装 e1071
【发布时间】:2012-12-05 20:42:30
【问题描述】:

我正在尝试在通过 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()

> 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   

有人可以帮忙吗?谢谢。

【问题讨论】:

  • 可能是linux工具which没有安装。
  • 不太确定,因为“未安装”会让您“未找到”为错误。

标签: r installation rstudio-server


【解决方案1】:

请注意,您可以这样做

sudo apt-get install r-cran-e1071

除此之外,您的错误可能表明缺少资源,可能是 RAM,还可能缺少您想要在本地构建软件包之前安装的 r-base-dev。

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

【讨论】:

  • 我认为r-base-dev 已经安装:sudo apt-get install r-base-dev Reading package lists... Done Building dependency tree Reading state information... Done r-base-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 272 not upgraded. 当我尝试安装r-cran-e1071 时,我收到此错误:E: Unable to locate package r-cran-e1071
  • 我可能确实缺乏资源。只有 2GB 的 RAM。修复 e1071 软件包问题后,我收到此错误 fork: Cannot allocate memory Error in fork() : Unable to fork. 我的下一个主题将是如何运行更精简的 Ubuntu 版本我猜...谢谢您的帮助!
【解决方案2】:

也许您可以通过

重新启动您的 RStudio 服务器
sudo rstudio-server restart

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-11-06
    • 2018-06-23
    • 1970-01-01
    • 2015-09-23
    • 2018-04-03
    • 2013-01-22
    • 2017-11-10
    • 1970-01-01
    相关资源
    最近更新 更多