简体   繁体   中英

install.packages() Rstudio server AWS ubuntu error

I have an AWS instance running ubuntu 12.04 and shiny server as well as Rstudio, however, when I try to add packages, I get an error when trying to load the library()

for the following command: install.packages("jsonlite", dependencies = TRUE, repos="http://cran.cs.wwu.edu") terminal output shows the download happens without any issues with the following as the last line The downloaded source packages are in '/tmp/RtmpO02nLU/downloaded_packages'

Clearly library() shows an error eg// Error in library(jsonlite) : there is no package called 'jsonlite' Is there something wrong with this process? how can I install packages to work with my Instance/ environment?

EDIT:: I realise there is the option of creating a swap file, wondering with the t1 instance, is there something really inefficient with the set up? rather than doing this or just upgrading the instance with throwing more memory at it..

You may want to sudo R to run R. Otherwise it won't allow you to install R package into the R library directory. Once you sudo R, then use install.packages again. Hope it works for you. I had similar problem before.

I had the same issue using a Virtual Machine through vagrant.

After updating the R version, I got the useful warning that the installation of the R package shiny failed because of lack of memory. I was using 512 Mb for RAM, this is not enough. After tweaking the Vagrantfile :

config.vm.provider "virtualbox" do |vb|
  # Customize the amount of memory on the VM:
  b.memory = "2048"
end

It worked out. Of note, to install dplyr I had to increase the virtual memory to 2048 Mb.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM