Skip to content

Instantly share code, notes, and snippets.

@chilampoon
Last active August 19, 2022 19:36
Show Gist options
  • Save chilampoon/59c9000c3e78099e577404bfeccc86a7 to your computer and use it in GitHub Desktop.
Save chilampoon/59c9000c3e78099e577404bfeccc86a7 to your computer and use it in GitHub Desktop.
Update R, R studio server and R packages

Upgrade RStudio Server (Version:1.1.463 Released:2018-10-29) in Ubuntu

sudo /usr/sbin/rstudio-server stop #stop the current version
# Download
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.1.463-amd64.deb
sudo gdebi rstudio-server-1.1.463-amd64.deb

Update R version (3.4 -> 3.5) in Ubuntu 16.04

sudo su
echo "deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
apt-get update
apt-get install r-base
apt-get install r-base-dev

Remember to check the Ubuntu version name using sudo lsb_release -a

See CRAN also.

Update old R packages

update.packages(ask = FALSE)

Otherwise this kind of error will occur: Error: package XXX was installed by an R version with different internals; it needs to be reinstalled for use with this R version Or just reinstall the old packages...

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