Product SiteDocumentation Site

5.5. 与其它软件包共存

Debian packages are not the only software packages used in the free software world. The main competitor is the RPM format of the Red Hat Linux distribution and its many derivatives. Red Hat is a very popular, commercial distribution. It is thus common for software provided by third parties to be offered as RPM packages rather than Debian.
这个情况下,你应该知道rpm程序是如何处理RPM软件包的,这种格式在Debian软件包中也可用。需要谨慎的使用,尽管如何,这些操作会限制从一个软件包中解压并且提取出信息以验证其完整性。实际上,不应该在Debian系统中使用rpm来安装一个RPM软件包;RPM使用了它自己的数据库以便和Debian的软件中分离(比如dpkg)。这也就是为什么不可能确保两个包管理系统共存在一个系统中,而这个系统还能保持稳定。
另一方面,alien 可以把RPM软件包转换成Debian软件包,反之亦然。
$ fakeroot alien --to-deb phpMyAdmin-2.0.5-2.noarch.rpm 
phpmyadmin_2.0.5-2_all.deb generated
$ ls -s phpmyadmin_2.0.5-2_all.deb
  64 phpmyadmin_2.0.5-2_all.deb
You will find that this process is extremely simple. You must know, however, that the package generated does not have any dependency information, since the dependencies in the two packaging formats don't have systematic correspondence. The administrator must thus manually ensure that the converted package will function correctly, and this is why Debian packages thus generated should be avoided as much as possible. Fortunately, Debian has the largest collection of software packages of all distributions, and it is likely that whatever you seek is already in there.
Looking at the man page for the alien command, you will also note that this program handles other packaging formats, especially the one used by the Slackware distribution (it is made of a simple tar.gz archive).
dpkg作为一个稳定的工具有助于提高Debian的名字。APT套件工具,在下面的章节中会告诉我们,它不但保留了这一优势,同时减轻了管理员管理软件包这一必须但是艰难得任务的负担。