zoukankan      html  css  js  c++  java
  • 在CcentOS系统上将deb包转换为rpm包

    deb文件格式本是ubuntu/debian系统下的安装文件,那么我想要在redhat/centos/fedora中安装,需要把deb格式的软件包转化成rpm格式。
     
    需要用到的转换工具:alien_8.89.tar.gz
     
    1、编译安装alien_8.89.tar.gz

    [root@localhost ~]# yum install perl make gcc      ##安装编译所必须的软件环境
    [root@localhost ~]# tar -zxvf alien_8.89.tar.gz
    [root@localhost ~]# cd alien
    [root@localhost alien]# perl Makefile.PL
    Writing Makefile for Alien
    [root@localhost alien]# make
    [root@localhost alien]# make install

    2、转换deb包为rpm包

    [root@localhost ~]# alien -r wondershaper_1.1a-6_all.deb     ##红色为要转换的deb包名称

    执行后出现下面的结果就说明转换成功了,就会在当前目录下产生一下相对应的rpm包

    wondershaper-1.1a-7.noarch.rpm generated

    3、再安装rpm包

    [root@localhost ~]# rpm -ivh wondershaper-1.1a-7.noarch.rpm

    报错与解决办法:
     
    1、在编译安装alien时可能会遇到下面报错
    [root@localhost alien]# perl Makefile.PL
    Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 2.
    BEGIN failed--compilation aborted at Makefile.PL line 2.
     
    执行下面命令即可解决:

    [root@localhost alien]# yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker

    2、在执行转换命令时,报rpmbuild: command not found
    [root@localhost ~]# alien -r wondershaper_1.1a-6_all.deb
    Package build failed. Here's the log of the command (cd wondershaper-1.1a; rpmbuild --buildroot='/root/wondershaper-1.1a' -bb --target noarch 'wondershaper-1.1a-7.spec'):
    sh: rpmbuild: command not found
     
    yum安装rpm-build即可:

    [root@localhost ~]# yum install rpm-build
  • 相关阅读:
    《Windows内核情景分析》读书笔记:windows内存管理
    个人的后门程序开发(第一部分):文件操作和注册表管理
    为GHOST远控添加ROOTKIT功能
    Nt函数原型头文件
    通过构造系统服务分发实现拦截&过滤 (仿360游戏保险箱)
    第一章:语法
    Activiti7工作流引擎
    Zabbix使用教程
    Visual Studio快捷键
    C#+Winform记事本程序
  • 原文地址:https://www.cnblogs.com/nulige/p/7607458.html
Copyright © 2011-2022 走看看