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

最新文章

  1. @Autowired注解的使用
  2. iPhone6/6 Plus兩款大屏智能機
  3. 如何使 WebAPI 自动生成漂亮又实用在线API文档
  4. linux的零碎使用
  5. php常用的数组函数
  6. 378. Kth Smallest Element in a Sorted Matrix
  7. 我的STL之旅 MyStack
  8. MySQL之扩展(触发器,存储过程等)
  9. iOS中利用CoreTelephony获取用户当前网络状态(判断2G,3G,4G)
  10. CodeForces 414D (贪心)
  11. 谈谈对MVC的理解
  12. c++、c实现推箱子小游戏
  13. PHP 易出问题记录
  14. BZOJ 1270: [BeijingWc2008]雷涛的小猫( dp )
  15. 利用享元模式来解决DOM元素过多导致的网页解析慢、卡死的问题
  16. 从0开始搭建vue+webpack脚手架(三)
  17. VS2012打开项目——已停止工作
  18. python第三十一课--递归(3.递归的弊端)
  19. VBA中数据库导出数据到Excel注意事项
  20. ActiveMQ5.0实战三:使用Spring发送,消费topic和queue消息

热门文章

  1. zkCli.sh客户端其他命令简介
  2. 【POJ 2976 Dropping tests】
  3. 【CZY选讲·最大子矩阵和】
  4. 莫队算法初识~~CodeForces - 617E
  5. bzoj 4621 Tc605 思想+dp
  6. python 下划线转驼峰
  7. WebSocket贪吃蛇例子学习
  8. sublime text 3将px换算为rem的插件的安装及使用
  9. 行为型设计模式之中介者模式(Mediator)
  10. MVC5的坑