转载自

http://www.heminjie.com/system/linux/1487.html

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
个人根据上面操作的时候遇到了一个新的问题:bad ELF interpreter: No such file or directory
百度后发现是64位安装了32位的的程序执行yum install glibc.i686命令即可,此外还有安装rpm包时有个依赖包的问题
加上-nodeps参数即可,可参考https://blog.csdn.net/jinwufeiyang/article/details/52069498

在CentOS系统上将deb包转换为rpm包的更多相关文章

  1. deb包转换为rpm包格式

    在Debian系列中安装软件包可以使用apt或者dpkg安装deb包,但是在CentOs, Redhat等则只能安装RPM包,如果希望在Redhat或者CentOS下也安装Deb包的话是不可行的, 但 ...

  2. 在CcentOS系统上将deb包转换为rpm包

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

  3. CentOS 如何将.deb 文件 转换.rpm, centos安装deb包

    CentOS 如何将.deb 文件 转换.rpm [root@localhost tmp]#tar zxvf alien_8.88.tar.gz yum install alien [root@loc ...

  4. CentOS 如何将.deb 文件 转换.rpm

    CentOS 如何将.deb 文件 转换.rpm [root@localhost tmp]#tar zxvf alien_8.88.tar.gz [root@localhost alien]#perl ...

  5. Linux学习总结(九)-源码包和rpm包安装

    一.源码包安装 通常办法是安装三部曲:./configuremakemake install但是具体还要根据包里面的帮助文档操作./configure --help 可以查看可以带什么参数,比如--p ...

  6. 使用alien命令让deb包和rpm包互相转换

    OS version: CentOS7 / Debian9 发现alien这个命令时很惊喜,之前在debian上安装etcd找不到安装包感觉很不科学,有了alien命令事情一下就变简单了. 这里以et ...

  7. centos 6 yum源记录,离线下载rpm包的办法

    wget -O /etc/yum.repos.d/CentOS6-Base-163.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo rp ...

  8. Centos 一次卸载多个RPM包

    rpm 不支持通配符,可以使用 xargs来接收多个变量 示例,一次性卸载所有 erlang先关的rpm包: rpm -qa | grep erlang | xargs rpm -e --nodeps

  9. CentOS里下载和离线安装rpm包

    离线下载rpm包    yum --downloadonly --downloaddir=/home/packages install mariadb-devel 安装离线rpm包    进入下载包的 ...

随机推荐

  1. 无状态会话bean(1)---定义

    无状态会话bean用于完毕在单个方法的生命周期内的操作.无状态bean能够实现很多业务操作,可是每一个方法都不能假定不论什么其它的方法会在它之前调用.后半句的意思是如今的你可能不是刚才的你.明天的你可 ...

  2. js进阶 14-4 $.get()方法和$.post()方法如何使用

    js进阶 14-4 $.get()方法和$.post()方法如何使用 一.总结 一句话总结:$.get(URL,callback); $.post(URL,data,callback); callba ...

  3. 16.用Spring Boot颠覆Java应用开发

    转自:https://www.cnblogs.com/aishangJava/p/5971288.html Java开发概述: 使用Java做Web应用开发已经有近20年的历史了,从最初的Servle ...

  4. angular 响应式表单(登录实例)

    一.表单验证 1. 只有一个验证规则: this.myGroup = this.fb.group({ email:['hurong.cen@qq.com',Validators.required], ...

  5. oracle expdp 备份脚本

    #!/bin/bash#Oracle 环境变量 NLS_LANG=AMERICAN_AMERICA.AL32UTF8 ORACLE_SID=zgw ORACLE_BASE=/opt/oracle OR ...

  6. Surging Demo 项目之一

    原文:Surging Demo 项目之一 开发与运行环境 IDE Visual Stadio 2017/Visual Stadio 2019 Visual Stadio Core Docker 和 D ...

  7. 【】queue

    [链接]点击打开链接 [题意] 实话实说,给 OIER 大神们排队这种工作是最让人头疼的事情了.因为同学们都有自尊 心,都不愿意排后面. 现在共有 n 个同学要排成一列,每个同学有两个属性:影响力和承 ...

  8. [WASM] Write to WebAssembly Memory from JavaScript

    We write a function that converts a string to lowercase in WebAssembly, demonstrating how to set the ...

  9. idea+springboot+freemarker热部署(转)

    今天在学习springboot集成freemarker模板引擎修改代码时,发现每次修改一次freemarker文件时,都必须重启下应用,浏览器刷新才能显示修改后的内容,这样效率太低,每次启动一次应用都 ...

  10. UILabel调整字间距

    1.引入 在文件导入 #import <CoreText/CoreText.h> 2.程序 NSMutableAttributedString *attributedString =[[N ...