centos 安装deb格式安装包

背景

研发给了我一个deb包,需要我在centos 这种服务器操作系统上安装...

deb包安装一般是使用dpkg -i xxxx.deb 命令,dpkg是Debian类型的系统,但是 通常centos是没有dpkg命令的...

直接就报:bash dpkg 未找到命令...

本来找研发给我编译rpm的包,结果还是没给我。 那就试试另外的方法吧。

处理办法

1、安装alien

yum install alien

alien 是什么? 是一款可用于转换deb\rpm 的程序,官方介绍如下:

DESCRIPTION
       alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your
       system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
 

2、通过alien命令转换test软件包为rpm格式

通过man alien命令可以查看alien命令的帮助信息,通过帮助信息可得知 alien -r 命令:


       -r, --to-rpm
           Make rpm packages.

详细选项可参考如下:

OPTIONS
       alien will convert all the files you pass into it into all the output types you specify. If no output type is specified, it defaults to converting to deb format.

       file [...]
           The list of package files to convert.

       -d, --to-deb
           Make debian packages. This is the default.

       -r, --to-rpm
           Make rpm packages.

       -t, --to-tgz
           Make tgz packages.

       --to-slp
           Make slp packages.

       -p, --to-pkg
           Make Solaris pkg packages.
 

是可以实现deb向rpm的转换的。

因此deb向rpm转换,只需要执行命令alien -r xxx.deb 就可以生成同名的rpm包:

网上有人说命令是:alien -r xxx.deb generated 实测是有问题的,就像上图一样,会报错,只需要 alien -r xxx.deb 就可以自动转换了。

3、测试转换成的rpm安装包

rpm -ivh xxx.rpm   

如果包没有问题,那么就ok了,如果报错就具体问题具体分析吧。

哈哈哈哈。。。。反正我没成功,我找研发去了。。。。

相关推荐

  1. ubuntu制作deb安装

    2024-07-11 02:12:05       42 阅读
  2. CentOS7 安装JDK、部署Jar

    2024-07-11 02:12:05       49 阅读
  3. WSL2-在Ubuntu-22.04上安装MySQL(deb)并配置ODBC

    2024-07-11 02:12:05       37 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-11 02:12:05       66 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-11 02:12:05       70 阅读
  3. 在Django里面运行非项目文件

    2024-07-11 02:12:05       57 阅读
  4. Python语言-面向对象

    2024-07-11 02:12:05       68 阅读

热门阅读

  1. 使用Python自动化收集和处理视频资源的教程

    2024-07-11 02:12:05       20 阅读
  2. 参数式确定的函数的导数公式及其推导过程

    2024-07-11 02:12:05       25 阅读
  3. 无题:天选之子?

    2024-07-11 02:12:05       24 阅读
  4. Flutter——最详细(GestureDetector)使用教程

    2024-07-11 02:12:05       23 阅读
  5. Jenkins构建python项目

    2024-07-11 02:12:05       19 阅读
  6. 使用nodejs进行截图

    2024-07-11 02:12:05       18 阅读
  7. nginx部署vue项目

    2024-07-11 02:12:05       24 阅读