简体   繁体   English

在Ubuntu Lucid中从二进制文件安装R包

[英]Install R packages from binary in Ubuntu Lucid

I've installed R in Ubuntu Lucid with the command 我用命令在Ubuntu Lucid中安装了R.

sudo aptitude install r-base sudo aptitude安装r-base

When I try to "install.packages" it seems to download source and then spend ages compiling it. 当我尝试“install.packages”时,它似乎下载了源代码,然后用了很长时间来编译它。 How can I get it to just download and install the binaries, like I'm used to on Windows? 我怎样才能下载并安装二进制文件,就像我以前在Windows上一样?

Is there any need to compile the packages myself? 有没有必要自己编译包? I'm running inside a VM so it would be great to keep things as slim as possible. 我在VM内部运行,因此尽可能保持简洁。

Thanks 谢谢

CRAN only distributes source for Unix, in other words no binaries are offered (unlike for Windows). CRAN仅为Unix分发源代码,换句话说,不提供二进制文件(与Windows不同)。 So you simply have to compile the packages locally. 所以你只需要在本地编译包。

That said, we have been working for a few years now on a system to turn CRAN source packages into Debian binary packages -- see cran2deb / debian.cran.r-project.org . 也就是说,我们已经在一个将CRAN源包转换成Debian二进制包的系统上工作了几年 - 参见cran2deb / debian.cran.r-project.org We currently build i386 binaries for Debian testing and are in the process of rewriting the backend to offer amd64 for Debian again and then eventually i386 and amd64 for Ubuntu. 我们目前正在为Debian测试构建i386二进制文件,并且正在重写后端以再次为Debian提供amd64,然后最终为Ubuntu提供i386和amd64。 This already offers well over two-thousand binary packages but not yet for all the flavours we would like to support eventually . 这已经提供了超过两万个二进制包,但还没有我们想最终支持的所有口味。

If and when that goal will be accomplished is hard to say; 如果能够实现这一目标很难说; this is a volunteer effort and the main developer (Charles) recently lost his laptop. 这是一项志愿者工作,主要开发人员(Charles)最近丢失了他的笔记本电脑。

CRAN packages are available in the Ubuntu package repository, but are updated with CRAN only when Ubuntu is updated. CRAN包在Ubuntu软件包存储库中可用,但在更新Ubuntu 时才使用CRAN进行更新。 If you want to use the latest CRAN version of a package and the repository is not at the same version, you will need to go through the compilation/installation procedure. 如果要使用软件包的最新CRAN版本且存储库的版本不同,则需要完成编译/安装过程。

Details in the Ubuntu R packages can be found on CRAN , which should give you all the information you require. 可以在CRAN上找到Ubuntu R软件包中的详细信息,它可以为您提供所需的所有信息。

As this (the provision of binaries) is all volunteer effort on the part of the CRAN maintainers, R Core and other devoted members of the community (eg Dirk, Vincent and Michael for the Debian and Ubuntu packages), the main effort has gone into providing binaries for systems where self-compilation is more difficult as the necessary tools are not easily available, unlike on Linux. 由于这个(提供二进制文件)是CRAN维护者,R Core和社区其他忠实成员(例如Dirk,Vincent和Michael的Debian和Ubuntu软件包)的志愿者工作,主要的努力已经进入为自动编译更困难的系统提供二进制文件,因为必要的工具不容易获得,这与Linux不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM