之前有篇文章写了方法一:使用alien 把rpm包转成deb包,再用dkpg命令安装。
今天又试了种新方法,直接使用rpm 命令安装 rpm包。
1. sudo apt-get install rpm 之后,直接安装 .rpm 包会出现如下错误:
xxha@lamdoc:/opt/STM/REPO$ rpm -ivh *.rpm
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
error: db5 error(-30969) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 - (-30969)
error: 无法打开包数据库 /home/xxha/.rpmdb
warning: stlinux24-host-deltarpm-3.4-4.i386.rpm: Header V3 DSA/SHA1 Signature, key ID fd1db626: NOKEY
error: db5 error(-30969) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: 无法打开包数据库 /home/xxha/.rpmdb
这是因为数据库版本不匹配造成的。可以把~/.rpmdb/下的db先删掉,
再rpm --rebuilddb, rpm --initdb 就好了。
xxha@lamdoc:/opt/STM/REPO$ ls ~/.rpmdb/
__db.001 __db.002 __db.003 __db.004 Name Packages
xxha@lamdoc:/opt/STM/REPO$ rm ~/.rpmdb/__db.00*
xxha@lamdoc:/opt/STM/REPO$ rpm --rebuilddb
xxha@lamdoc:/opt/STM/REPO$ rpm --initdb
warning: Generating 11 missing index(es), please wait...
xxha@lamdoc:/opt/STM/REPO$ ls ~/.rpmdb/
Basenames __db.001 __db.003 Dirnames Installtid Obsoletename Providename .rpm.lock Sigmd5
Conflictname __db.002 __db.004 Group Name Packages Requirename Sha1header Triggername
2. 这时再安装.rpm包时会出现另一个错:
xxha@lamdoc:/opt/STM/REPO$ rpm -ivh *.rpm
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
warning: stlinux24-host-deltarpm-3.4-4.i386.rpm: Header V3 DSA/SHA1 Signature, key ID fd1db626: NOKEY
error: 依赖性检测失败:
/usr/bin/perl 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libbz2.so.1 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6(GLIBC_2.0) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6(GLIBC_2.1) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6(GLIBC_2.2) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Digest::MD5) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Fcntl) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Net::Domain) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(POSIX) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Socket) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(bytes) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(strict) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
rpm-python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
rpm >= 0:4.1.1 被 stlinux24-host-yum-3.2.24-27.i386 所需要
libxml2-python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
/bin/sh 被 stlinux24-host-yum-3.2.24-27.i386 所需要
/usr/bin/python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
这是依赖性问题,后面加 --nodeps 参数就可以安装了,如下:
xxha@lamdoc:/opt/STM/REPO$ sudo rpm -ivh *.rpm --nodeps
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
warning: stlinux24-host-deltarpm-3.4-4.i386.rpm: Header V3 DSA/SHA1 Signature, key ID fd1db626: NOKEY
正在准备… ########################################### [100%]
1:stlinux24-host-filesyst########################################### [ 33%]
2:stlinux24-host-deltarpm########################################### [ 67%]
3:stlinux24-host-yum ########################################### [100%]
成功安装.rpm包
今天又试了种新方法,直接使用rpm 命令安装 rpm包。
1. sudo apt-get install rpm 之后,直接安装 .rpm 包会出现如下错误:
xxha@lamdoc:/opt/STM/REPO$ rpm -ivh *.rpm
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
error: db5 error(-30969) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 - (-30969)
error: 无法打开包数据库 /home/xxha/.rpmdb
warning: stlinux24-host-deltarpm-3.4-4.i386.rpm: Header V3 DSA/SHA1 Signature, key ID fd1db626: NOKEY
error: db5 error(-30969) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: 无法打开包数据库 /home/xxha/.rpmdb
这是因为数据库版本不匹配造成的。可以把~/.rpmdb/下的db先删掉,
再rpm --rebuilddb, rpm --initdb 就好了。
xxha@lamdoc:/opt/STM/REPO$ ls ~/.rpmdb/
__db.001 __db.002 __db.003 __db.004 Name Packages
xxha@lamdoc:/opt/STM/REPO$ rm ~/.rpmdb/__db.00*
xxha@lamdoc:/opt/STM/REPO$ rpm --rebuilddb
xxha@lamdoc:/opt/STM/REPO$ rpm --initdb
warning: Generating 11 missing index(es), please wait...
xxha@lamdoc:/opt/STM/REPO$ ls ~/.rpmdb/
Basenames __db.001 __db.003 Dirnames Installtid Obsoletename Providename .rpm.lock Sigmd5
Conflictname __db.002 __db.004 Group Name Packages Requirename Sha1header Triggername
2. 这时再安装.rpm包时会出现另一个错:
xxha@lamdoc:/opt/STM/REPO$ rpm -ivh *.rpm
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
warning: stlinux24-host-deltarpm-3.4-4.i386.rpm: Header V3 DSA/SHA1 Signature, key ID fd1db626: NOKEY
error: 依赖性检测失败:
/usr/bin/perl 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libbz2.so.1 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6(GLIBC_2.0) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6(GLIBC_2.1) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
libc.so.6(GLIBC_2.2) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Digest::MD5) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Fcntl) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Net::Domain) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(POSIX) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(Socket) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(bytes) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
perl(strict) 被 stlinux24-host-deltarpm-3.4-4.i386 所需要
python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
rpm-python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
rpm >= 0:4.1.1 被 stlinux24-host-yum-3.2.24-27.i386 所需要
libxml2-python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
/bin/sh 被 stlinux24-host-yum-3.2.24-27.i386 所需要
/usr/bin/python 被 stlinux24-host-yum-3.2.24-27.i386 所需要
这是依赖性问题,后面加 --nodeps 参数就可以安装了,如下:
xxha@lamdoc:/opt/STM/REPO$ sudo rpm -ivh *.rpm --nodeps
rpm:RPM should not be used directly install RPM packages, use Alien instead!
rpm:However assuming you know what you are doing...
warning: stlinux24-host-deltarpm-3.4-4.i386.rpm: Header V3 DSA/SHA1 Signature, key ID fd1db626: NOKEY
正在准备… ########################################### [100%]
1:stlinux24-host-filesyst########################################### [ 33%]
2:stlinux24-host-deltarpm########################################### [ 67%]
3:stlinux24-host-yum ########################################### [100%]
成功安装.rpm包