我一直未尝试安装r-base的最新版本(2.15.2)。显然,R包Rcpp
不会为R版本2.14.1安装(为我安装的版本)。
我不确定在下面显示的更改安装尝试的方式/方式/位置。请注意,我正在使用ubuntu-12.04.1-server-i386。
当前安装的版本是R版本2.14.1(2011-12-22):
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version.
包含版本信息无济于事:
$ sudo apt-get install r-base=2.15.1-5ubuntu1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.15.1-5ubuntu1' for 'r-base' was not found
根据http://cran.r-project.org/bin/linux/ubuntu/README中的 CRAN Ubuntu指令进行的更改:
添加到
/etc/apt/sources.list
deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu quantal/
更新并安装
$ sudo apt-get update $ 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 (>= 2.15.2-1quantal2) but it is not going to be installed Depends: r-recommended (= 2.15.2-1quantal2) but it is not going to be installed Recommends: r-base-html but it is not going to be installed E: Unable to correct problems, you have held broken packages.
R-base
确实是“最新”版本,请安装/更新(如果不是),请参阅下面的链接我的答案。如果您希望与最新R
版本保持同步,建议您使用最新版本sid
(尽管您可能希望在将整个系统基于sid
... 时保持谨慎)。stackoverflow.com/questions/1401904/...
sudo apt-get upgrade
还是sudo apt-get dist-upgrade
?