![在 Linux Mint 17.1 Cinnamon 中安装 R-base](https://linux22.com/image/5528/%E5%9C%A8%20Linux%20Mint%2017.1%20Cinnamon%20%E4%B8%AD%E5%AE%89%E8%A3%85%20R-base.png)
我正在尝试使用以下命令安装 r-base 软件包Linux Mint 社区软件视图。
通过单击“安装”按钮,有人会询问我“安装其他软件吗?”。再次点击“安装”,出现以下错误消息:
Can not install 'r-base' (E:Unable to correct problems, you have held broken packages.)
这是以下的输出apt-cache policy
:
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://ppa.launchpad.net/webupd8team/java/ubuntu/ trusty/main Translation-en
500 http://ppa.launchpad.net/webupd8team/java/ubuntu/ trusty/main i386 Packages
release v=14.04,o=LP-PPA-webupd8team-java,a=trusty,n=trusty,l=Oracle Java (JDK) 7 / 8 / 9 Installer PPA,c=main
origin ppa.launchpad.net
500 http://ppa.launchpad.net/webupd8team/java/ubuntu/ trusty/main amd64 Packages
release v=14.04,o=LP-PPA-webupd8team-java,a=trusty,n=trusty,l=Oracle Java (JDK) 7 / 8 / 9 Installer PPA,c=main
origin ppa.launchpad.net
500 http://repository.spotify.com/ stable/non-free i386 Packages
release v=0.4,o=Spotify LTD,a=stable,n=stable,l=Spotify Public Repository,c=non-free
origin repository.spotify.com
500 http://repository.spotify.com/ stable/non-free amd64 Packages
release v=0.4,o=Spotify LTD,a=stable,n=stable,l=Spotify Public Repository,c=non-free
origin repository.spotify.com
500 http://archive.canonical.com/ubuntu/ trusty/partner Translation-en
500 http://archive.canonical.com/ubuntu/ trusty/partner i386 Packages
release v=14.04,o=Canonical,a=trusty,n=trusty,l=Partner archive,c=partner
origin archive.canonical.com
500 http://archive.canonical.com/ubuntu/ trusty/partner amd64 Packages
release v=14.04,o=Canonical,a=trusty,n=trusty,l=Partner archive,c=partner
origin archive.canonical.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/universe Translation-en
500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted Translation-en
500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse Translation-en
500 http://security.ubuntu.com/ubuntu/ trusty-security/main Translation-en
500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse i386 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=multiverse
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/universe i386 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=universe
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted i386 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=restricted
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=main
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=multiverse
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=universe
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=restricted
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=main
origin security.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse i386 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=multiverse
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe i386 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=universe
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted i386 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=restricted
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=main
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=multiverse
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=universe
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=restricted
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=main
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/universe Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty/restricted Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty/main Translation-en
500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse i386 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=multiverse
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=universe
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/restricted i386 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=restricted
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=multiverse
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=universe
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/restricted amd64 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=restricted
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
origin archive.ubuntu.com
700 http://extra.linuxmint.com/ rebecca/main i386 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=main
origin extra.linuxmint.com
700 http://extra.linuxmint.com/ rebecca/main amd64 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=main
origin extra.linuxmint.com
700 http://packages.linuxmint.com/ rebecca/import i386 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=import
origin packages.linuxmint.com
700 http://packages.linuxmint.com/ rebecca/upstream i386 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=upstream
origin packages.linuxmint.com
700 http://packages.linuxmint.com/ rebecca/main i386 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=main
origin packages.linuxmint.com
700 http://packages.linuxmint.com/ rebecca/import amd64 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=import
origin packages.linuxmint.com
700 http://packages.linuxmint.com/ rebecca/upstream amd64 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=upstream
origin packages.linuxmint.com
700 http://packages.linuxmint.com/ rebecca/main amd64 Packages
release v=17.1,o=linuxmint,a=rebecca,n=rebecca,l=linuxmint,c=main
origin packages.linuxmint.com
500 http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages
release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
origin dl.google.com
500 http://dl.google.com/linux/chrome/deb/ stable/main amd64 Packages
release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
origin dl.google.com
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
release v=12.04,o=CRAN,a=precise,n=precise,l=CRAN,c=
origin cran.stat.ucla.edu
Pinned packages:
这是以下的输出apt-cache policy r-base
:
r-base:
Installed: (none)
Candidate: 3.1.3-1precise2
Version table:
3.1.3-1precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.1-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.0-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.3.20140328-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.3-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.2-1ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
3.0.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-6precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-5precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-3precise 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-1precise0precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.0-2precise 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.3-1precise0precise1 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.1-1precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.0-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
最后,这是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.1.3-1precise2) but it is not going to be installed
Depends: r-recommended (= 3.1.3-1precise2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
以下是 sudo apt-cache 策略 r-base-core r-recommulated 的输出:
r-base-core:
Installed: (none)
Candidate: 3.1.3-1precise2
Version table:
3.1.3-1precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.1-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.0-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.3.20140328-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.3-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.2-1ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
3.0.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-6precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-5precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-3precise 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-1precise0precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.0-2precise 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.3-1precise0precise1 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.1-1precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.0-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
r-recommended:
Installed: (none)
Candidate: 3.1.3-1precise2
Version table:
3.1.3-1precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.1-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.1.0-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.3.20140328-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.3-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.2-1ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
3.0.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-6precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-5precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-3precise 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-1precise0precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
3.0.0-2precise 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.3-1precise0precise1 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.2-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.1-1precise2 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
2.15.0-1precise0 0
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
而以下是命令终端的输出sudo apt-get install r.base-core
:
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-core : Depends: libtiff4 but it is not installable
E: Unable to correct problems, you have held broken packages.
`sudo apt-cache policy libtiff4 的输出是:
libtiff4:
Installed: (none)
Candidate: (none)
Version table:
从`sudo apt-get install libtiff4 是:
`Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libtiff4 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 'libtiff4' has no installation candidate
我也尝试使用软件管理器安装它,但没有成功。
在互联网上浏览时,我找到了一些通过终端使用 Ubuntu 12.10+ 来安装它的代码,但没有任何内容适合 Linux Mint(或者,至少我认为不是)。
有人知道如何安装 R 软件或建议正确的步骤吗?
答案1
的输出apt-cache policy
包括:
500 http://cran.stat.ucla.edu/bin/linux/ubuntu/ precise/ Packages
release v=12.04,o=CRAN,a=precise,n=precise,l=CRAN,c=
origin cran.stat.ucla.edu
问题在于 CRAN 的来源是为了“精确”,而它们本应是为了“可信”。海报运行的是 Mint 版本 17.1 Rebecca。这与“可信”兼容,但与“精确”不兼容。将此 CRAN 源更改为“可信”后,发布者报告问题已解决。