rpm包deb包互转工具——Alien

小熊 Linux评论9,3131字数 2162阅读7分12秒阅读模式

英文版本的,都比较基础,就不翻译了,如果有问题可以给我留言

  1. Convert RPM to DEB
    Install alien command on Debian / Ubuntu
    Install alien command on Ubuntu as shown below.
# sudo apt-get install alien

Use alien command to convert rpm to deb file
The following example converts the linuxconf-devel rpm file to linuxconf-devel deb file. Once you generate the deb file, you can install it on Ubuntu or Debian.

# alien linuxconf-devel-1.16r10-2.i386.rpm
linuxconf-devel_1.16r10-3_i386.deb generated

Install deb packages using the dpkg command — Debian: How to Install or Remove DEB Packages Using dpkg

  1. Convert DEB to RPM
    Use alien to convert deb to rpm file
    Use alient -r option to convert a deb file to rpm file. The following example converts libsox deb file to libsox rpm file. Once you generate the rpm file, you can install it on Red Hat, or CentOS.
# sudo alien -r libsox1_14.2.0-1_i386.deb
libsox1-14.2.0-2.i386.rpm generated

Install rpm packages using rpm command — RPM Command: 15 Examples to Install, Uninstall, Upgrade, Query RPM Packages

  1. Convert to SLP, LSB, Slackware TGZ packages
    You can also use alien command to convert files to Stampede slp package, LSB package, and Slackware tgz package. Do alien -h to see available options.
# alien -h
Usage: alien [options] file [...]
  file [...]                Package file or files to convert.
  -d, --to-deb              Generate a Debian deb package (default).
     Enables these options:
       --patch=      Specify patch file to use instead of automatically
                            looking 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 .orig
                            directory.
       --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= Specify package description.
       --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.
  -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.

转自:How to Convert DEB to RPM (RPM to DEB) Package Using Alien Command

weinxin
公众号
扫码订阅最新深度技术文,回复【资源】获取技术大礼包
Linux最后更新:2020-8-31
小熊