less than 1 minute read

1. WSL2 setup : WSL2 설치하기

2. Ubuntu apt repo url 변경하기

  • 기본 url에서 kakao mirror로 변경하는 법은 이 블로그를 참고함

3. WSL Ubuntu 상에 R 및 Rstudio 설치

  • official docs
  • apt를 통한 R 설치는 R version 4.1 을 설치할 것이므로 위 site에서 추천하는 대로 official CRAN page를 참고하여 설치할 것
  • 내 PC에서 셋업한 방식
# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc 
# Fingerprint: 298A3A825C0D65DFD57CBB651716619E084DAB9
sudo 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
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"

sudo apt install --no-install-recommends r-base

sudo add-apt-repository ppa:c2d4u.team/c2d4u4.0+
  • 그 후 official docs 4번부터 진행

Categories:

Updated: