Skip to content

Instantly share code, notes, and snippets.

@fegue
Forked from ElToro1966/r_ubuntu_18_04.sh
Last active May 10, 2021 07:36
Show Gist options
  • Save fegue/035c6c8b134063aebd05fb957e2804fa to your computer and use it in GitHub Desktop.
Save fegue/035c6c8b134063aebd05fb957e2804fa to your computer and use it in GitHub Desktop.
[R on Linux] Setup R and RStudio on Ubuntu 20.04 #R #linux
#!/bin/bash
# Add CRAN Repository for an up-to-date R-Version
# https://cran.r-project.org/bin/linux/ubuntu/README.html
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
# Follow instructions to add key
# Install R
sudo apt update
sudo apt install libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
# Just click on th deb package on the website and install
# OR follow instructions from
# https://www.rstudio.com/products/rstudio/download-server/debian-ubuntu/
cd ~/Downloads
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1106-amd64.deb
sudo apt install rstudio-1.4.1106-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
# Make RStudio look a bit nicer
sudo apt install qt5-style-plugins
echo "export QT_QPA_PLATFORMTHEME=gtk2" >> ~/.profile
@EmadElden
Copy link

rstudio depends on libclang-dev; however:
Package libclang-dev is not installed.

error processing package rstudio (--install):
dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for shared-mime-info (1.15-1) ...

@fegue
Copy link
Author

fegue commented May 10, 2021

Well I guess you need to install libclang-dev
sudo apt install libclang-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment