ununtu 18.04 版本中安装R,因为一直报错,显示数字签名和源(不可忽视)的问题

因为今天安装R包,学些拓朴数据分析,结果看了好几个包,都没有windows和Mac版本,只有linux的,所以很无奈,只能在虚拟机上安装R。

转载:腾讯原文链接

首先,打开ubuntu左下角的菜单,选择“”软件更新器“或者”软件和更新“”,把源改为“主服务器”,不要选中国的或者其他高校的源。如果你安装的是英文版本ubuntu,也应该选择第一个,大概是“main server". 安装完以后,你可以改回来。你也可以用命令行该,自己度娘看看怎么输入命令行。

第1步 - 添加GPG密钥

以sudo非root用户身份登录到您的Ubuntu 18.04服务器,添加相关的GPG密钥。

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

第2步 - 添加R存储库(这里你要看清楚,不同的Ubuntu版本对应的R也不同,)

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

(R 3.6 packages for Ubuntu on i386 and amd64 are available for most stable Desktop releases of Ubuntu until their official end of life date. However, only the latest Long Term Support (LTS) release is fully supported. As of November 18, 2018 the supported releases are Xenial Xerus (16.04; LTS), Trusty Tahr (14.04; LTS), Bionic Beaver (18.04;LTS), Cosmic Cuttlefish (18.10), and Disco Dingo (19.04). Note, to install R 3.6 packages, a different sources.list entry is needed. See below for details. Even though R has moved to version 3.6, for compatibility the sources.list entry still uses the cran3.5 designation.)

第3步 - 更新包列表

sudo apt update

第4步 - 安装R

sudo apt install r-base

第5步 - 测试安装

以root身份启动R的交互式shell。

sudo -i R

您应该收到类似于以下内容的输出:

R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
...
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
​
>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值