在 Ubuntu 16.04 上安装 R 时出错(通过 Crouton 在 Chromebook 上运行)

在 Ubuntu 16.04 上安装 R 时出错(通过 Crouton 在 Chromebook 上运行)

我在 Ubuntu 16.04 上安装 R 时遇到了困难。我意识到之前已经发布过类似的问题,并且我尝试了提供的所有解决方案,但似乎都没有对我有用。

我正在遵循这个帖子

在昨天之前我从未使用过 Linux 或终端,所以说实话我真的不知道自己在做什么,只是尝试了人们说可能有效的各种命令,但不幸的是,无济于事。

这是我收到的错误消息:

The following packages have unmet dependencies: r-base : Depends: r-base-
core (>= 3.4.3-1xenial0) but it is not installable Depends: r-recommended 
(= 3.4.3-1xenial0) but it is not going to be installed Recommends: r-base-
html but it is not going to be installed Recommends: r-doc-html but it is 
not going to be installed E: Unable to correct problems, you have held 
broken packages.

任何建议或指导都非常感谢!谢谢你的帮助

以下是所要求的输出:

(xenial)samerbibi@localhost:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
(xenial)samerbibi@localhost:~$ apt-cache policy r-base-core
r-base-core:
  Installed: (none)
  Candidate: (none)
  Version table:

(xenial)samerbibi@localhost:~$ sudo apt-get update
Get:1 http://cran.rstudio.com/bin/linux/ubuntu xenial/ InRelease [3590 B]
Get:2 https://cran.rstudio.com/bin/linux/ubuntu xenial/ InRelease [3590 B]
Hit:3 http://ppa.launchpad.net/marutter/rdev/ubuntu xenial InRelease           
Hit:4 http://ppa.launchpad.net/marutter/rrutter/ubuntu xenial InRelease      
Fetched 7180 B in 2s (3468 B/s)                                              
Reading package lists... Done
W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
E: Failed to stat /var/lib/apt/lists/partial/cran.rstudio.com_bin_linux_ubuntu_xenial_InRelease - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:5
W: Duplicate sources.list entry https://cran.rstudio.com/bin/linux/ubuntu xenial/ Release

好的,我相信我已成功删除重复项,因此 http 和 https 之间应该没有冲突。得到以下内容:

(xenial)samerbibi@localhost:~$ sudo apt-get update
Hit:1 https://cran.rstudio.com/bin/linux/ubuntu xenial/ InRelease
Hit:2 http://ppa.launchpad.net/marutter/rdev/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/marutter/rrutter/ubuntu xenial InRelease      
Reading package lists... Done                      
(xenial)samerbibi@localhost:~$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-base : Depends: r-base-core (>= 3.4.3-1xenial0) but it is not installable
          Depends: r-recommended (= 3.4.3-1xenial0) but it is not going to be installed
          Recommends: r-base-html but it is not going to be installed
          Recommends: r-doc-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

相关内容