如何在Debian上安装2个不同的R版本? [英] How to install 2 different R versions on Debian?

查看:231
本文介绍了如何在Debian上安装2个不同的R版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的服务器上,R 2.12.1按照 http://cran.r- project.org/bin/linux/debian/ ,使用 apt-get install 等等。

On our server, R 2.12.1 is installed following the instructions on http://cran.r-project.org/bin/linux/debian/ , using apt-get install etc etc.

由于情况,旧的lenny机器没有更新到新的稳定的debian,而且看起来这不是即将发生的。由于这里的一些研究依赖于最新版本的VGAM,我们需要在debian上安装R 2.14.0。但是为了保持旧的代码运行,我们不能只是放弃R 2.12.1(在这个版本上安装VGAM 0.8.4给出错误)。

Due to circumstances the old lenny machine hasn't been updated to the new stable debian, and it looks like this isn't about to happen soon. As some of the research here depends on the latest version of VGAM, we need the R 2.14.0 installed on debian. But in order to keep old code running, we can't just drop the R 2.12.1 (installing the VGAM 0.8.4 on this version gives errors).

所以我们需要安装2个R版本。从我所了解的一点,如果我们只使用 apt-get upgrade ,旧版本将被新的替换。我一直在阅读文档,但是我找不到这样做的最佳方式。

So we need to install 2 R-versions. From the little I understood, if we just use apt-get upgrade the old version will be replaced by the new. I've been going through heaps of documentation, but I can't find the optimal way of doing so.

我现在唯一可以想象的是尝试从源代码中构建最新的R,但是我的同事们对这个想法并不十分敏锐,并促使我先看为另一个解决方案。任何我错过的信息,还是有人愿意告诉我这个小技巧呢?如果从源头构建是解决方案,我想听听有关任何陷阱或可能的问题。

The only thing I could imagine now, is to try to build the latest R from source, but my colleagues were not very keen on that idea and prompted me to first look for another solution. Any info I missed, or is somebody willing to show me the little trick to get this done? If building from source is the solution, I'd like to hear about any pitfalls or possible problems.

推荐答案

正如我在评论,这是理论上的可能,就像一些软件包系列(Emacs,PostgreSQL,...)可以允许多个并发版本。

As I mentioned in comments, this is theoretically possible just like some package families (Emacs, PostgreSQL, ...) allow multiple concurrent versions.

我现在不能提供,因为我们使用 / usr / {share,lib} / R 哪些冲突。如果我要使用 / usr / {share,lib} / R- $ version 然后使用 dpkg-alternatives 翻转到默认首选,我们可以做到。问题是转型。这个功能被少数用户使用,得到它可能会引入大多数的错误,直到这是稳定的。另外,我没有空闲时间(但是如果有人想要这样做,请这样做)。

I cannot offer that right now as we use /usr/{share,lib}/R which conflicts. If I were to make that /usr/{share,lib}/R-$version and then use dpkg-alternatives to flip to a default preferred one, we could possibly do it. The problem is the transition. This feature is used by a minority of user, getting to it may introduce bugs for a majority til this is stable. Plus, I do not have the spare time (but if someone else wants to do it, please do so).

同时,您可以


  1. 可能使用高级功能 dpkg 并解压缩到本地目录,而不是默认值低于 / - 所以 /应该可以使用opt / R / oldversions / 2.12.1 。 R甚至可以运行,您需要相应地重新定义 $ RHOME

  1. possibly use an advanced feature of dpkg and unpack to a local directory rather the default below / -- so /opt/R/oldversions/2.12.1 should be possible. R could even run, you need to redefine $RHOME accordingly.

只需将本地变体 / usr / local 如果你真的必须

just build local variants into /usr/local if you really must

如果一个特定的CRAN /非CRAN包要求需要一个特定版本的R,修复已经死了的包! ; - )

if a particular CRAN / non-CRAN package claims to need a particular version of R, fix the damn package already! ;-)

最后,这是 r-sig-debian ,例如CRAN维护者Michael和Johannes在这里不会读这个主题。

Finally, this is a topic for r-sig-debian as eg the CRAN maintainer Michael and Johannes won't read this thread here.

这篇关于如何在Debian上安装2个不同的R版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆