多包管理器 [英] Multiple package manager

查看:131
本文介绍了多包管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用多个程序包管理器是否有陷阱?我可以同时使用Redhat的yum和Debian的能力吗?

Is there a pitfall of using multiple package managers? Could I use Redhat's yum with Debian's aptitude at the same time?

我遇到了这篇文章和此信息图-

I came across this article and this infographic -

我倾向于选择Debian,但是快速安装VM表明,在稳定的仓库中内核尚未升级到3.2.因此,我计划迁移到Archlinux,但是由于信息图表显示该软件包的可用性较低,因此我想知道是否可以从Fedora或Ubuntu存储库中安装.deb或.rpm文件.

I was inclined to choose Debian, but a quick VM install showed that the Kernel is not upgraded to 3.2 in the stable repo yet. So I am planning to move to Archlinux, but the infographic rates it low on package availablity and I was wondering if I could install .deb or .rpm files from the Fedora or Ubuntu repositories.

推荐答案

简短的答案是,是的,您可以,但是您确实不应该.

The short answer is, yes you can, but you really shouldn't.

以下是在进行交叉分发安装时要考虑的事项列表(无特定顺序):

Below is a list of things (in no particular order) to consider when cross-distribution installing:

  • 依赖地狱

首先出现诸如yum/apt/yast之类的东西的主要原因是要避免被称为依赖地狱.通过使用来自其他系统的软件包,您将不能干净安装就放弃了放入软件包中的工作.

The primary reason things like yum/apt/yast exist in the first place is to avoid what is known as dependency hell. By using packages from other systems, you forfeit the work that has been put into the packages from installing cleanly.

辅助软件包管理器将要满足其自身的依赖性,并安装一堆已经安装的东西.这意味着您必须一次安装一个软件包,以免覆盖主软件包管理器中已经安装的软件包,并且会遇到各种问题.

The secondary package manager will want to satisfy its own dependencies, and install a bunch of things that are already installed. This means you have to install packages a piece at a time so that you don't overwrite already installed packages from your primary package manager, and have all kinds of problems.

  • 他们使用相同的包裹管理器吗?

如果这样做的话,您甚至可以直接安装它,但您可能会遇到依赖问题或程序包冲突.如果没有,则可以使用各种工具提取软件包,然后将二进制文件放到文件系统中(请查看Alien或

If they do, you may even be able to just install it outright, but you'll likely have dependancy issues or package conflicts. If they don't, you can extract the package with various tools and just lay down the binary files onto the file system (have a look at alien, or this post about extracting .rpm and .deb files).

这将为您提供系统上的文件,但不能保证它会立即可用.可能需要(通常是)一些其他的手动狩猎.

This will get you the files on the system, but there is no guarantee it'll work out of the box. Some additional manual hunting may be (and usually is) required.

  • 基本软件包(例如glibc)的版本是否相同或非常接近?

如果是这样,则出现问题的机会较小.这两个发行版的基本软件包之间的差异越大,您运行的发行版中缺少的共享库就越有可能丢失,因为版本不同并且文件名与二进制文件不匹配.寻找.

If so, there is less chance of an issue. The further difference between the two distribution's base packages, the more likely you'll have missing shared libraries that aren't available in the distribution you're running on, because the version is different and the filename doesn't match what the binary is looking for.

从技术上讲,您还可以从其他发行版中提取基本依赖项,并将它们放在文件系统中,但是,如果您需要从源代码进行编译,那肯定会给您带来麻烦.想象一下gcc会多么混乱.

Technically you could also extract the base dependencies from the other distribution and put them on the filesystem as well, but that will certainly cause you pain should you ever need to compile things from source. Imagine how confused gcc will be.

  • 您要安装的软件包是否需要特定的内核模块?

我能清楚地说明这一点的最佳方法是我最近从网络主机购买VM时看到的一个常见问题.您获得了自己的xen或virtuozzo内核品牌,而iptables不能完全正常工作,因为netfilter位于内核中并且ABI已更改.使它重新工作可能非常令人头疼,并且此问题不仅限于iptables.我最好的建议是在自己的基本存储库中选择具有所需内核的发行版.

The best way I can articulate this is a common problem I see these days with buying VMs from a web host; you get their own brand of xen or virtuozzo kernel, and iptables doesn't work outright because netfilter is in the kernel and the ABI has changed. It can be quite the headache to get it working again, and this issue isn't limited to iptables. My best advice here is pick the distribution that has the kernel you want in its own base repository.

  • 从源代码编译

毫无疑问,如果您非常想从其他系统获取软件包,则必须这样做.由于各种发行版以不同的方式设置其构建环境,因此您将花费一半的时间来解决路径和其他配置问题.

No doubt you'll have to do this should you get very deep into wanting packages from other systems. Since the various distros setup their build environments differently, you'll be spending half your time figuring out pathing and other configuration issues.

这篇关于多包管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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