我需要安装r-base 3.0.2,因为所需的库还不兼容3.0.3 (最新版本)。
我可以像这样安装旧版本的R:
sudo apt-get install r-base=3.0.2-1precise0然而,r-base的所有依赖项都尝试使用3.0.3进行安装。
root@foo:~# apt-get install r-base=3.0.2-1precise0
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-recommended (= 3.0.2-1precise0) but 3.0.3-1precise0 is to be installed
E: Unable to correct problems, you have held broken packages.我想我可以先安装每个依赖项,但是有很多依赖项。
r-cran-boot r-cran-class r-cran-cluster r-cran-codetools r-cran-foreign r-cran-kernsmooth r-cran-lattice
r-cran-mass r-cran-matrix r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart r-cran-spatial r-cran-survival
r-recommended我对Centos和百胜最熟悉。
有没有一种方法可以“版本锁定”r和所有它的依赖关系到3.0.2而不是3.0.3?
root@foo:~# apt-cache policy r-base
r-base:
Installed: (none)
Candidate: 3.0.3-1precise0
Version table:
3.0.3-1precise0 0
500 http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/ Packages
3.0.2-1precise0 0
500 http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-6precise0 0
500 http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-5precise0 0
500 http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/ Packages
3.0.1-3precise 0
500 http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/ Packages发布于 2014-03-17 23:43:27
剥掉这只猫的方法不止一种,但我认为最简单的方法是使用apt偏好对R包进行引脚。
在/etc/apt/preferences.d中创建一个包含
Package: r-*
Pin: version 3.0.3-*
Pin-Priority: -1运行apt-get update或aptitude update以考虑/etc/apt/preferences或/etc/apt/preferences.d中的任何更改。
使用上面的版本,名称以3.0.3-something开头的包的任何表单r-的版本都会强制优先级为-1,意思是“不要安装”。
另一种方法是给予3.0.2如此高的优先级,以至于apt甚至会降低对他们的评级。
Package: r-*
Pin: version 3.0.2-*
Pin-Priority: 1001发布于 2014-03-17 06:39:41
您可以使用以下命令来完成它:
sudo apt-get install r-recommended=3.0.2-1precise0 r-base=3.0.2-1precise0 任何额外的依赖都是一样的。
另一种您可以尝试的方法:
禁用"Universe“存储库,并添加以下存储库(最新版本为3.0.2),这样您就不会有问题了。
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get install r-basehttps://unix.stackexchange.com/questions/120021
复制相似问题