Search code examples
rlinuxrstudiochromebookcrouton

Installing R and RStudio on Chromebook Samsung 3


I have been trying to but struggling to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. I can install R just fine but either can't install Rstudio at all or can get the icon for Rstudio to show up but nothing happens when I click on it. Can someone give me a process on how to install these effectively on my device?


Solution

  • UPDATE 2020:

    I am no longer using Crouton, but rather the built in Linux option (Crostini). In the Linux terminal, I did the following:

    sudo apt-get update; sudo apt-get upgrade; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
    
    sudo apt install -y gnupg2
    
    sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
    
    sudo vi /etc/apt/sources.list
    

    Add this line. Can use a different mirror if desired. (Note: older versions of Crostini were running Stretch by default instead of Buster)

    deb http://cran.rstudio.com/bin/linux/debian buster-cran35/
    

    Then back in the terminal

    sudo apt-get install xclip
    
    sudo apt install -y r-base r-base-dev
    
    sudo apt-get install gdebi-core
    
    sudo apt install -y libgstreamer1.0 libgstreamer-plugins-base1.0 libxslt-dev libnss3
    
    sudo apt --fix-broken install
    
    sudo curl -o rstudio.deb https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5033-amd64.deb
    
    sudo dpkg -i rstudio.deb
    
    sudo apt-get update; sudo apt-get upgrade; sudo apt --fix-broken install; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
    

    ORIGINAL ANSWER:

    It admittedly took me a long time, but I was finally able to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. After setting up Crouton, etc. here is what I had to do in the Linux terminal:

    sudo apt-get install software-properties-common
    sudo apt-get install selinux-policy-default
    sudo apt-get install libqpol1
    

    Add these lines:

    deb https://<FOO>/bin/linux/ubuntu trusty/
    deb https://<FOO>/ trusty-backports main restricted universe
    

    to file

    /etc/apt/sources.list
    

    (replace FOO with the CRAN mirror of your choice and replace trusty if applicable)

    Terminal:

    sudo apt-get update
    sudo apt-get install r-base
    sudo apt-get install r-base-dev
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
    sudo add-apt-repository ppa:marutter/rrutter
    sudo apt update
    sudo apt upgrade
    sudo apt upgrade r-base r-base-dev
    sudo apt-get install gdebi-core
    wget https://download2.rstudio.org/rstudio-server-1.1.442-amd64.deb
    sudo gdebi rstudio-server-1.1.442-amd64.deb
    wget https://download1.rstudio.org/rstudio-0.99.896-amd64.deb
    sudo apt-get install libxslt1-dev
    sudo gdebi rstudio-0.99.896-amd64.deb
    cd /usr/bin/
    rstudio