我很困惑。我已经完成了这个过程十几次,从来没有这个问题。install.packages R在Ubuntu 12.04下载但不会安装软件包
我安装了最新的R版本的Ubuntu
我进入R,完全没有问题,给我的最新版本,我可以加载本地软件包。
但是当我尝试安装新的软件包时,他们会下载,但我什么也没得到。例如,如果我安装GGPLOT2:
> install.packages("ggplot2")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘colorspace’, ‘stringr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘plyr’, ‘digest’, ‘gtable’, ‘reshape2’, ‘scales’, ‘proto’
trying URL 'http://rweb.quant.ku.edu/cran/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://rweb.quant.ku.edu/cran/src/contrib/stringr_0.6.2.tar.gz'
Content type 'application/x-gzip' length 20636 bytes (20 Kb)
opened URL
==================================================
downloaded 20 Kb
[snip ... ]
trying URL 'http://rweb.quant.ku.edu/cran/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/RtmpoPUAFL/downloaded_packages’
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
我已经完全清除文件的次数,但不与任何运气。
我以root身份登录。
我觉得我失去了明显的东西?我不知道 - 我在Ubuntu,Mac,Windows和Debian上做了十次这样的事情。帮帮我?
您在Amazon EC2或类似的东西? – jdharrison
是的,我在VPS(Digital Ocean)上。我在Linode上做了十几次相同的安装过程。 这是另一个线索。我只是安装在一个单独的VPS上,这将是我的生产服务器,并且没有问题。 –
我在Amazon EC2上运行微型实例时遇到了类似的问题。内存不足,安装软件包会导致您所描述的内容。我通过启用一些交换修复它看到http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance – jdharrison