How to install RStudio on a Chromebook


Today we are looking at how to install R-base and RStudio  on a Chromebook.

If you have any questions, please contact us via a Rumble comment and we would be happy to assist you!

This tutorial will only work on Chromebooks with an Intel or AMD CPU (with Linux Apps Support) and not those with an ARM64 architecture CPU.

Please use the video as a visual guide, and the commands and links below to install it on your Chromebook.

We are on social media! For announcements, content release updates (across all our projects), and much more, please join our Reddit community!
https://www.reddit.com/r/linuxmadesimple/


1) 00:05 (time stamp in the video)
We start the process by enabling the Linux Container on our Chromebook.  You can always remove it again in the future as well if needed.

To enable it, we go to the settings of our Chromebook, inside of it, we click on the "Advance" option in the left panel, and then the "Developers" section. Then enable Linux from there as seen in the video.

2) 00:35
Now we continue to the next phase in the tutorial and that is to run several commands in our Linux terminal, which will install our system to install the application.

During the installation process we will also upgrade our Linux container to Debian 12 Testing, applications like Menulibre doesn't work currently with it, but wew use an alterntive in this video.

Some general facts about the terminal.  To paste a command into the Linux terminal, press "Ctrl Shift v" together.  After you paste a command into the Linux terminal, please press "enter" to run it.  At some commands you will see a question to press Y or n to continue.  If you see it press "enter" to continue.

2.1) This command will move our current Linux system repositories file to a different location, as an backup.  We will create a new onne with the next two commands.

sudo mv /etc/apt/sources.list /etc/apt/oldsources.list

2.2) 01:05 This command will create a new, empty, Linux repositories file.

sudo touch /etc/apt/sources.list

2.3) 01:13 This command will add a repositoriy to our newly created file.

sudo echo deb https://deb.debian.org/debian bookworm main  | sudo tee -a /etc/apt/sources.list

2.4) 01:21 Now we will update the repositories of our Linux container

sudo apt update

2.5) 01:34 Now we will upgrade our system to Debian 12 Testing.  The Y and n question will appear in this command, please press "enter" then. 

sudo apt dist-upgrade

2.6) 02:28 Now we will add another repository to our Linux container which R-base and RStudio require.

echo "deb https://deb.debian.org/debian stretch main" | sudo tee /etc/apt/sources.list.d/stretch_chrome_os_made_simple.list

2.7) 02:38 Now we will add a security key to our system, which the repository which we just added requires.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B8F25A8A73EACF41

2.8) 02:51 Now we will update the repositories of our Linux container

sudo apt update

2.9) 03:09 Now we will install R-base and some packages which is required.

sudo apt install r-base libnss3 libssl1.0.2

2.10) 03:35 This command will download the installer.

wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.02.3-492-amd64.deb

2.11) 03:54 This command will install RStudio.  Please take note that you will see some errors in the output, as the installer needs some additional packages which we will install with the next command.

sudo dpkg -i rstudio-2022.02.3-492-amd64.deb

2.12) 04:12 This command will install all the dependencies which the application required, which we mentioned in the previous step

sudo apt -f install

3) 04:39 Now we will launch RStudio.

Enjoy!

Comments