无法升级 R

无法升级 R

我的系统:Ubuntu 18.04.4

Rscript --version
R scripting front-end version 3.4.4 (2018-03-15)

我的问题:升级失败R

脚步:

sudo apt-get remove r-base r-base-dev
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 (as instructed here: https://cran.r-project.org/bin/linux/ubuntu/)
sudo apt update
sudo apt install r-base r-base-core r-recommended

输出:

The following packages have unmet dependencies.
 r-base-core : Depends: libreadline6 (>= 6.0) but it is not installable

尝试安装时libreadline6我得到:

sudo apt install libreadline6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libreadline6 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libreadline6' has no installation candidate

答案1

搜索人 libreadline6显示你需要安装libreadline-dev作为libreadline6在 Bionic (18.04) 中是一个虚拟包。

答案2

事实证明 libreadline6 在 Ubuntu Bionic (18.04) 上不可用,所以我不得不从 Ubuntu Xenial (16.04) 获取它

为此我去了这里: https://pkgs.org/search/?q=libreadline6 您将获得适用于各种架构的 libreadline6 选项列表:amd64、i386 等。

要了解您的体系结构,请运行以下命令:

 uname -m

就我而言,因为这个命令返回了 x86_64,所以我选择了:libreadline6_6.3-8ubuntu2_amd64.deb

单击链接后,您将进入另一个页面。在该页面中搜索“二进制包”。它将显示指向一个 deb 包的链接。选择“软件安装(默认)”打开,libreadline6 包将被安装。

我终于有了:R脚本前端版本3.6.3(2020-02-29)

相关内容