r-base-core:依赖:libpng12-0 失败

r-base-core:依赖:libpng12-0 失败

我无法安装 R-base-core,因为无法安装 libpng12-0。尝试安装 libpng12-0 时,我得到了

Package 'libpng12-0' has no installation candidate

我看过很多关于添加不同仓库的帖子,但它们要么什么都没做,要么给了Updating from such a repository can't be done securely, and is therefore disabled by default

以下是完整的失败:

The following packages have unmet dependencies:
 r-base-core : Depends: libpng12-0 (>= 1.2.13-4) but it is not installable
               Recommends: r-recommended but it is not going to be installed
               Recommends: r-base-dev 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.

调用 uname -a 会得到 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

运行此命令: cat /etc/apt/sources.list

#

# deb cdrom:[Ubuntu-Server 17.10 _Artful Aardvark_ - Release amd64 (20171017.1)]/ artful main restricted

# deb cdrom:[Ubuntu-Server 17.10 _Artful Aardvark_ - Release amd64 (20171017.1)]/ artful main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ artful main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ artful main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ artful-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ artful universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ artful universe
deb http://us.archive.ubuntu.com/ubuntu/ artful-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ artful-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ artful multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://us.archive.ubuntu.com/ubuntu/ artful-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ artful-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu artful partner
# deb-src http://archive.canonical.com/ubuntu artful partner

deb http://security.ubuntu.com/ubuntu artful-security main restricted
# deb-src http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu artful-security universe
# deb-src http://security.ubuntu.com/ubuntu artful-security universe
deb http://security.ubuntu.com/ubuntu artful-security multiverse
# deb-src http://security.ubuntu.com/ubuntu artful-security multiverse
deb http://cran.rstudio.com/bin/linux/ubuntu xenial/
deb https://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu xenial/
# deb-src https://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu xenial/

今晚我花了相当多的时间尝试安装 R。

答案1

您应该下载适合您的 ubuntu 版本的 R 存储库,即 Artful 而不是 xenial。首先尝试下载并安装 libpng12-0,如下所示E:软件包‘libpng12-0’没有安装候选项 [ubuntu 16.10 Gnome]

然后,该版本的 r-base-core 应该基于 libreadline6,而 libreadline6 已不再可用。因此,下载适用于 ubuntu artful 的版本并从中删除以下几行sources.list

deb http://cran.rstudio.com/bin/linux/ubuntu xenial/
deb https://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu xenial/
# deb-src https://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu xenial/

相关内容