为可以安装在不同机器上的 Linux 创建 R 二进制包? [英] Create R binary packages for Linux that can be installed on different machines?
问题描述
我很确定这是不可能的,因为如果是这样,那么 CRAN 将拥有 R Linux 二进制包.为什么不可能?我们可以创建 R 包的 Mac 和 Windows 二进制版本,这些 tgz/zip 文件可以安装在不同的系统上.为什么我们不能对 Linux 做同样的事情?
I'm pretty sure this isn't possible, because if it were, then CRAN would have R Linux binary packages. Why isn't it possible? We can create Mac and Windows binary versions of R packages, and these tgz/zip files could be installed on different systems. Why can't we do the same for Linux?
我猜是因为有很多不同的发行版,而且每个发行版都不一样.是否可以为 Debian/Ubuntu 和 RHEL/CentOS 创建二进制文件?
I'm guessing because there are many different distros, and each distro is different. Is it possible to create binary files for Debian/Ubuntu and RHEL/CentOS?
如果可能,我们该怎么做?谢谢.
If it's possible, how do we do it? Thanks.
推荐答案
不同的编译器版本,不同的 libc/libstc++ 版本,不同的其他库"版本,不同的发行周期,......将目标与动态链接相匹配.
Different compiler releases, different libc/libstc++ releases, different "other library" releases, different per-distro release cycles, ... make it that you just cannot match that goal with dynamic linking.
您可以到达一半,例如RStudio 通过 a) 捆绑所有依赖项和 b) 反映子集,就像它们对 Debian/Ubuntu 和 RH/FC/CentOS 所做的那样.但是使用 a) 压缩包会变得很大,就像使用静态链接一样.
You can get half-way there as e.g. RStudio does by a) bundling all your depends and b) reflecting subsets as they do for Debian/Ubuntu and RH/FC/CentOS. But with a) the tarballs would get massive, as they would with static linking.
简而言之:你不能在 Linux 上.所以回到源头.
In short: you can't on Linux. So back to sources it is.
这篇关于为可以安装在不同机器上的 Linux 创建 R 二进制包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!