Skip to content

Latest commit

 

History

History
135 lines (93 loc) · 4.99 KB

20240131_01.md

File metadata and controls

135 lines (93 loc) · 4.99 KB

alien 转换 rpm TO deb 安装包

作者

digoal

日期

2024-01-31

标签

PostgreSQL , PolarDB , DuckDB , redhat , debian , rpm , deb


背景

参考:

1、install alien

apt-get update  
  
apt-get install -y alien  
  
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 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=<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.  

2、convert rpm to deb

以oceanbase/polardb-x为例

alien -d ./oceanbase-ce-4.2.2.0-100000192024011915.el8.aarch64.rpm    
  
oceanbase-ce_4.2.2.0-1.00000192024012e+17_arm64.deb generated  
alien -d ./t-polardbx-engine-2.3.0-b959577.el7.aarch64.rpm

Warning: Skipping conversion of scripts in package t-polardbx-engine: preinst
Warning: Use the --scripts parameter to include the scripts.
t-polardbx-engine_2.0.1-1_arm64.deb generated

3、install deb

dpkg -i oceanbase-ce_4.2.2.0-1.00000192024012e+17_arm64.deb  

dpkg -i t-polardbx-engine_2.0.1-1_arm64.deb

如果有post install script, 可能会有一些错误.

4、(可选) fix broker

apt --fix-broken install  

5、(可选) install deb again

6、check install

dpkg -l | grep oceanbase  
  
ii  oceanbase-ce                           4.2.2.0-1.00000192024012e+17   arm64        OceanBase is a distributed relational database  
root@35d087c6860d:/tmp/polardb# dpkg -l |grep polar

ii  t-polardbx-engine                      2.0.1-1                        arm64        PolarDB-X engine 8.0 based on Oracle MySQL 8.0

7、安装包文件位置

dpkg-query -L oceanbase-ce  

dpkg-query -L t-polardbx-engine

转换的安装, 存在问题的可能性较大, 特别是so的版本不一致等. 这种操作比较适合依赖少的软件.

digoal's wechat