ubuntu 18.04.06LST安装R4.0+版本报错及解决过程

1. sudo apt-get update无法正常使用

错误:13 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu bionic Release
  404  Not Found [IP: 2620:2d:4000:1::3e 80]

解决措施:删除 webupd8team/sublime-text-3这个ppa文件。

sudo add-apt-repository --remove ppa:/webupd8team/sublime-text-3

2.sudo apt-get update还是无法正常使用

正在读取软件包列表... 完成                                                     
E: 仓库 “http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu bionic Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。

解决措施:更换源,这里使用清华源。

sudo cp /etc/apt/sources.list.bak /etc/apt/sources.list
sudo vim /etc/apt/sources.list

接着在sources.list开头直接加入以下内容哦

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
#deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

 3.install R in Ubuntu

参考以下链接安装R。

How To Install R on Ubuntu 18.04 [Quickstart] | DigitalOceanR is an open-source programming language that specializes in statistical computing and graphics. In this tutorial, we will install R on an Ubuntu 18.04 server.https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04-quickstart具体用到的代码如下:

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-cran40/'
sudo apt update
sudo apt upgrade
sudo apt-get install r-base

 4.安装R最后一步r-base报错

报错如下:

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
 r-base : 依赖: r-base-core (>= 4.2.2.20221110-1.2004.0) 但是它将不会被安装
          依赖: r-recommended (= 4.2.2.20221110-1.2004.0) 但是它将不会被安装
          推荐: r-base-html 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

解决方法:参考“下列软件包有未满足的依赖关系“解决方案_kai_io的博客-CSDN博客

这里再换源是没用的!!!

具体代码如下:

sudo apt-get install -y aptitude
sudo aptitude install r-base-core

在使用aptitude修正依赖关系时,是否接受解决方案可先n后y。

最终结果见下:

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值