A Step-by-Step Guide: Installing RStudio on Vanilla OS 22.10 Kinetic
This guide will walk you through the process of installing RStudio on Vanilla OS 22.10 Kinetic using an apt (Ubuntu) container.
Initial Setup
First, we need to prepare the apt container and install the necessary prerequisites. Open your terminal and run the following commands:
Enter the apt container:
apx enter apt
Install common software properties:
sudo apt install --no-install-recommends software-properties-common dirmngr
Install required libraries:
sudo apt install libasound2
sudo apt install libnss3
Update and upgrade your system:
sudo apt update
sudo apt upgrade
Downloading and Installing RStudio
Next, download the RStudio Desktop .deb file from the official source: RStudio Desktop 2023.06.2-561
Once the download is complete, install it by running:
cd Downloads
ls
sudo dpkg -i rstudio-2023.06.2-561-amd64.deb
Note: If you encounter any dependency errors during installation, run
sudo apt --fix-broken installand then repeat thedpkgcommand.
Installing R
To run RStudio, you also need to install R. Add the official R repository and install the base package:
Add the R repository:
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
Add the public key:
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
Install R Base:
sudo apt install r-base
Utilizing RStudio
With everything installed, you can now launch RStudio directly from your terminal by typing:
rstudio
Useful Commands
| Command | Function |
|---|---|
apx enter apt | Enters the apt (Ubuntu) container |
rstudio | Launches the RStudio application |
R --version | Displays the installed R version |
exit | Exits the current directory or container |
sudo apt update | Fetches available updates |
sudo apt upgrade | Installs available updates |