在ubuntu上安装ggp​​lot2包

时间:2014-05-04 11:50:55

标签: r

我正在使用R 3.1和Rstudio 0.98.507在虚拟机内运行的ubuntu精确穿山甲我无法安装ggp​​lot2

这是输出:

install.packages('ggplot2')

Installing package into ‘/home/uwhpsc/R/i686-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘colorspace’, ‘Rcpp’, ‘stringr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘plyr’, ‘digest’, ‘gtable’, ‘reshape2’, ‘scales’, ‘proto’

trying URL 'http://cran.rstudio.com/src/contrib/colorspace_1.2-4.tar.gz'
Content type 'application/x-gzip' length 242791 bytes (237 Kb)
opened URL
==================================================
downloaded 237 Kb

trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.11.1.tar.gz'
Content type 'application/x-gzip' length 2003515 bytes (1.9 Mb)
opened URL
==================================================
downloaded 1.9 Mb

trying URL 'http://cran.rstudio.com/src/contrib/stringr_0.6.2.tar.gz'
Content type 'application/x-gzip' length 20636 bytes (20 Kb)
opened URL
==================================================
downloaded 20 Kb

trying URL 'http://cran.rstudio.com/src/contrib/RColorBrewer_1.0-5.tar.gz'
Content type 'application/x-gzip' length 10656 bytes (10 Kb)
opened URL
==================================================
downloaded 10 Kb

trying URL 'http://cran.rstudio.com/src/contrib/dichromat_2.0-0.tar.gz'
Content type 'application/x-gzip' length 84320 bytes (82 Kb)
opened URL
==================================================
downloaded 82 Kb

trying URL 'http://cran.rstudio.com/src/contrib/munsell_0.4.2.tar.gz'
Content type 'application/x-gzip' length 91026 bytes (88 Kb)
opened URL
==================================================
downloaded 88 Kb

trying URL 'http://cran.rstudio.com/src/contrib/labeling_0.2.tar.gz'
Content type 'application/x-gzip' length 9998 bytes
opened URL
==================================================
downloaded 9998 bytes

trying URL 'http://cran.rstudio.com/src/contrib/plyr_1.8.1.tar.gz'
Content type 'application/x-gzip' length 393233 bytes (384 Kb)
opened URL
==================================================
downloaded 384 Kb

trying URL 'http://cran.rstudio.com/src/contrib/digest_0.6.4.tar.gz'
Content type 'application/x-gzip' length 79309 bytes (77 Kb)
opened URL
==================================================
downloaded 77 Kb

trying URL 'http://cran.rstudio.com/src/contrib/gtable_0.1.2.tar.gz'
Content type 'application/x-gzip' length 19667 bytes (19 Kb)
opened URL
==================================================
downloaded 19 Kb

trying URL 'http://cran.rstudio.com/src/contrib/reshape2_1.4.tar.gz'
Content type 'application/x-gzip' length 34121 bytes (33 Kb)
opened URL
==================================================
downloaded 33 Kb

trying URL 'http://cran.rstudio.com/src/contrib/scales_0.2.4.tar.gz'
Content type 'application/x-gzip' length 40093 bytes (39 Kb)
opened URL
==================================================
downloaded 39 Kb

trying URL 'http://cran.rstudio.com/src/contrib/proto_0.3-10.tar.gz'
Content type 'application/x-gzip' length 530758 bytes (518 Kb)
opened URL
==================================================
downloaded 518 Kb

trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_0.9.3.1.tar.gz'
Content type 'application/x-gzip' length 2330942 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb


The downloaded source packages are in
    ‘/tmp/Rtmpi3YRSS/downloaded_packages’
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’

1 个答案:

答案 0 :(得分:9)

如果您没有启用交换文件并且用完ram,则OOM(内存不足)杀手通常会终止违规进程。在尝试安装软件包时,这会以OP的问题中描述的方式展示。要解决此问题,应启用交换文件。

$ dd if=/dev/zero of=/swapfile bs=1024 count=512k

$ mkswap /swapfile
$ swapon /swapfile

您可以更改交换文件的属性,例如swappiness,请参阅示例here