Sudo apt-key adv –keyserver –recv-keys KEYID We can eliminate the error above by fetching the missing public key, just copy the KEYID at the end of the error message instead of KEYID in the command below. Getting the missing key (signature) is easy, so why not do it?
I do not like ignoring errors, specially related to checks of whether files have been damaged or tempered with before or during download.
This triggers an error that the comment in the instructions I used told to ignore.
#Add following line (or your favorite CRAN mirror)Īfter adding the new repository, we need to update the database of available software again. # Add CRAN mirror to custom sources.list file using nano
This is done by editing a text file, and in this example we use nano a very simple text editor. There is a copy of the R repository in the Ubuntu distribution repo, but it is not kept up-to-date in-between Ubuntu releases, so if we want to install the latest version, and later be able to get the latest upgrades we need to add to the repositories used CRAN itself. # Update all files from the default state The second line actually does the upgrades. The first command updates the database of versions current at the moment in the repositories. Sudo chmod -R 0777 /home/rstudioĮven if you just created a new instance for an AMI in AWS, it is always good to make sure that there are no pending upgrades.
# Create a user, home directory and set password The instructions below can be used to create a user called rstudio a directory, set a password and then change the permissions for this user’s home directory. Please see the RStudio website for further details on server installation, and administration. You need to also install R, TeX, and Git. This requires more than just installing RStudio server.
Installing via the package manager has the nice side benefit that you get minor version upgrades automatically.These are the minimal instructions on how to setup an RStudio server in an EC2 instance in AWS cloud server under Ubuntu. It is not absolutely required, but highly recommended, to install r-base-dev also. You will need to add the appropriate line for your installation (I believe fresh EC2 instances start with bionic, but I am not 100% certain and don't have time to check) and then run sudo apt-get update & sudo apt-get install r-base. It will require some tweaking of your /etc/apt/sources.list file, possibly via sudo nano /etc/apt/sources.list command (I prefer nano to vim, as I know how to exit nano in a hurry, but that is a personal choice - both are available on AWS Linux). Thanks in advance to anybody willing to help.Īs for the R 3.6 vs ubuntu 19.04 thing - having a current version of R in an AWS EC2 environment is not only possible, but highly recommended. I thought I would always just have to type the IP (:8787) and smoothly access Rstudio without much hassle. I can't find out where the problem resides exactly. This time, it kept loading, and nothing is displayed. I closed, typed the IP again to restart it. I tried to install packages again, it crashed again. It restarted and let me know that the previous R session was abnormally terminated due to an unexpected crash. I closed the window and tried to type the IP again to restart Rstudio. I tried to install some packages (like the tidyverse one), the process started and got suddenly interrupted at some point. I typed ubuntu as username and my root password to enter Rstudio. I have set up all the necessary ports number (I think) 8787, 22, 443, 80. I have it installed on an ubuntu server on AWS EC2 through SSH (putty). I am actually having a hard time using Rstudio server.