Install R and Rstudio in Lubuntu 18.04

Installing R and Rstudio was not so easy in a fresh Lubuntu 18.04 install. Here is the solution :

First open the terminal and enter:

sudo apt update
sudo apt upgrade

Edit the file  /etc/apt/sources.list

and add:
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/

Enter these commands also in terminal:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt update
sudo apt upgrade

sudo apt install r-base r-base-dev

Load this file:
https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.1335-amd64.deb

(or any newer)

And install it

In terminal, enter:
sudo apt install at-spi2-core
sudo apt install build-essential
sudo apt install qtcreator
sudo apt install qt5-default

Restart using:
sudo reboot

And run Rstudio with:
export QT_XCB_FORCE_SOFTWARE_OPENGL=1
export QT_STYLE_OVERRIDE=""
/usr/lib/rstudio/bin/rstudio

it forces to not use the xserver-xorg-video-nouveau video driver

Or add these lines in 
sudo vi /etc/environment

QT_XCB_FORCE_SOFTWARE_OPENGL=1
QT_STYLE_OVERRIDE=""

And now you can run Rstudio !


Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04