R 최신 버전을 Ubuntu에서 설치하는 법

2016/10/02

Ubuntu를 8년 전에 샀던 PC에 인스톨 하였습니다. Ubuntu에서 R을 통한 개발 환경을 구축해보려 하였습니다. 그러나 설치했는데 최신 버전이 아닌 구버전이 설치되는 것이었습니다. 다음의 포스트를 보고 R 3.3.1 버전 설치를 성공하였습니다.

How to Install R on Linux Ubuntu 16.04 Xenial Xerus

요약하자면 다음과 같습니다.

Add R repository

sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list

Add R to Ubuntu Keyring

First:

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9

Then:

gpg -a --export E084DAB9 | sudo apt-key add -

Install R-Base

sudo apt-get update
sudo apt-get install r-base r-base-dev

Installing R-Studio

From here you can download your files and install the IDE through Ubuntu Software Center or Synaptic Package Manager, or since you’ve already got the terminal open, you could just:

sudo apt-get install gdebi-core
wget https://s3.amazonaws.com/rstudio-dailybuilds/rstudio-1.0.33-amd64.deb
sudo gdebi -n rstudio-1.0.33-amd64.deb
rm rstudio-1.0.33-amd64.deb