Skip to content

Commit

Permalink
update docs for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
determ1ne committed Nov 16, 2023
1 parent b38c6ac commit c055b1d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions docs/zh/CRAN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ options("repos" = c(CRAN="https://mirrors.zju.edu.cn/CRAN/"))

### Ubuntu 下添加 CRAN 镜像安装 R

参考 [README 里的步骤](https://mirrors.zju.edu.cn/CRAN/bin/linux/ubuntu)

例如, Ubuntu 18.04 LTS 编辑 `/etc/apt/sources.list.d/r-zju.list` 输入 `deb https://mirrors.zju.edu.cn/CRAN/bin/linux/ubuntu bionic-cran40/` (注意根据你的发行版替换 bionic ,根据需要的版本号替换 cran40 )

然后运行
参考 [README 里的步骤](https://mirrors.zju.edu.cn/CRAN/bin/linux/ubuntu),运行

```bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get install r-base-dev
```
sudo apt update -qq
sudo apt install --no-install-recommends software-properties-common dirmngr
wget -qO- https://mirrors.zju.edu.cn/misc/cran/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
sudo add-apt-repository "deb https://mirrors.zju.edu.cn/CRAN/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
```

0 comments on commit c055b1d

Please sign in to comment.