linux alien命令将deb安装包和rpm安装包进行相互转换

编程入门 行业动态 更新时间:2024-10-15 08:21:31

linux alien命令将deb<a href=https://www.elefans.com/category/jswz/34/1769751.html style=安装包和rpm安装包进行相互转换"/>

linux alien命令将deb安装包和rpm安装包进行相互转换

alien命令作用

alien是一个用于在各种不同的Linux包格式相互转换的工具,其最常见的用法是将.rpm转换成.deb(或者反过来)

alien命令安装

Debian系linux可使用下面命令安装alien:

sudo apt-get install alien

redhat系linux可使用下面命令安装alien:

yum install epel-release
yum update && yum install alien
yum clean all   
yum makecache  

linux分类:
1、debian系主要有Debian,Ubuntu,Mint等及其衍生版本:
2、redhat系主要有RedHatFedora,CentOs等.
3、其它有Slackware,Gentoo,Arch linux,LFS,SUSE等。

alien命令使用说明

查看alien使用帮助可以看出如果使用

[root@MiWiFi-R4AC-srv 2]# alien --help
Usage: alien [options] file [...]file [...]                Package file or files to convert.-d, --to-deb              Generate a Debian deb package (default).Enables these options:--patch=<patch>      Specify patch file to use instead of automaticallylooking for patch in /var/lib/alien.--nopatch            Do not use patches.--anypatch           Use even old version os patches.-s, --single         Like --generate, but do not create .origdirectory.--fixperms           Munge/fix permissions and owners.--test               Test generated packages with lintian.-r, --to-rpm              Generate a Red Hat rpm package.--to-slp              Generate a Stampede slp package.-l, --to-lsb              Generate a LSB package.-t, --to-tgz              Generate a Slackware tgz package.Enables these options:--description=<desc> Specify package description.--version=<version>  Specify package version.-p, --to-pkg              Generate a Solaris pkg package.-i, --install             Install generated package.-g, --generate            Generate build tree, but do not build package.-c, --scripts             Include scripts in package.--target=<arch>       Set architecture of the generated package.-v, --verbose             Display each command alien runs.--veryverbose         Be verbose, and also display output of run commands.-k, --keep-version        Do not change version of generated package.--bump=number         Increment package version by this number.-h, --help                Display this help message.-V, --version             Display alien's version number.

实例展示(RPM、DEB包相互转换)

下面以SunloginClient_11.0.1.44968_uos_amd64.deb为例(向日葵)
下面将.deb包转化为.rpm包

[root@MiWiFi-R4AC-srv 1]# alien -r SunloginClient_11.0.1.44968_uos_amd64.deb 
Warning: Skipping conversion of scripts in package com.oray.sunlogin.client: postinst postrm preinst prerm
Warning: Use the --scripts parameter to include the scripts.
com.oray.sunlogin.client-11.0.1.44968-2.x86_64.rpm generated
[root@MiWiFi-R4AC-srv 1]# ls
com.oray.sunlogin.client-11.0.1.44968-2.x86_64.rpm  SunloginClient_11.0.1.44968_uos_amd64.deb

下面将.rpm包转化为.deb包

[root@MiWiFi-R4AC-srv 2]# alien -d sunlogin.client-11.0.1.44968-2.x86_64.rpm 
com.oray.sunlogin.client_11.0.1.44968-3_amd64.deb generated
[root@MiWiFi-R4AC-srv 2]# ls
com.oray.sunlogin.client_11.0.1.44968-3_amd64.deb  sunlogin.client-11.0.1.44968-2.x86_64.rpm

思考

转换后的包能否正常安装在不同的终端机上,不光和包后缀有关,还和该终端一些其他因素有关,如cpu架构、系统版本及依赖包等,转换后的包能不能用需要进一步实践

更多推荐

linux alien命令将deb安装包和rpm安装包进行相互转换

本文发布于:2024-02-06 16:23:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1750322.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:安装包   命令   alien   linux   deb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!