前言
Ubuntu自帶的官方源一直是有長時間的發(fā)布延遲的,因此即使是R已經(jīng)穩(wěn)定版本發(fā)布到3.6.2了,官方源依舊是3.4版本….
這里使用R的官方repo進(jìn)行安裝疹味,實現(xiàn)Ubuntu18.04下安裝最新穩(wěn)定版的R(3.6.2)
如果要在CentOS下安裝ShinyServer静袖,請查看這里:https://www.liujason.com/article/472.html
安裝步驟
首先安裝支持HTTPS添加新repo所需的軟件包:
apt install sudo -y && sudo apt install apt-transport-https software-properties-common -y
然后使用以下命令啟用CRAN存儲庫并將CRAN GPG密鑰添加到系統(tǒng):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
現(xiàn)在已經(jīng)添加了apt repo,更新軟件包列表并通過鍵入以下命令安裝R軟件包:
sudo apt update -y
sudo apt install r-base -y
完成安裝~已經(jīng)是最新的版本了朋鞍!
驗證版本
liujason@rshiny:~/RShinyProjects$ R --version
R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
轉(zhuǎn)自:Ubuntu18.04安裝最新版本R (3.6.2) | 使用官方穩(wěn)定版R源repo LiuJason'sBlog