0

我一直在寻找这个错误,但找不到任何东西。我正在尝试在 Centos 6.2 64 位版本上创建一个 chroot 监狱,我正在执行以下操作:

mkdir -p /home/chroot/
mkdir -p /home/chroot/var/lib/rpm
rpm --rebuilddb --root=/home/chroot/
cd /usr/src
wget http://mirror.centos.org/centos-6/6.3/os/x86_64/Packages/centos-release-6-3.el6.centos.9.x86_64.rpm
rpm -i --root=/home/chroot/ --nodeps centos-release-6-3.el6.centos.9.x86_64.rpm

哪个失败说:

warning: centos-release-6-3.el6.centos.9.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: opening of centos-release-6-3.el6.centos.9.x86_64.rpm fails: No such file or directory
/home/chroot/var/lib/rpm: No such file or directory

对详细 (-ivv) 输出执行相同操作:

D: ============== centos-release-6-3.el6.centos.9.x86_64.rpm
D: loading keyring from pubkeys in /home/chroot/var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /home/chroot/var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening  db environment /home/chroot/var/lib/rpm cdb:mpool:joinenv
D: opening  db index       /home/chroot/var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /home/chroot/var/lib/rpm/Packages
D: opening  db index       /home/chroot/var/lib/rpm/Name rdonly mode=0x0
D: Expected size:        20444 = lead(96)+sigs(1284)+pad(4)+data(19060)
D:   Actual size:        20444
advertencia:centos-release-6-3.el6.centos.9.x86_64.rpm: CabeceraV3 RSA/SHA1 Signature, ID de clave c105b9de: NOKEY
D: ========== relocations
D:      added binary package [0]
D: found 0 source and 1 binary packages
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D:     0    0    0    0    1   +centos-release-6-3.el6.centos.9.x86_64
D: installing binary packages
D: closed   db index       /home/chroot/var/lib/rpm/Name
D: closed   db index       /home/chroot/var/lib/rpm/Packages
D: closed   db environment /home/chroot/var/lib/rpm
D: removed  db environment /home/chroot/var/lib/rpm
D: opening  db environment /home/chroot/var/lib/rpm create:cdb:mpool:joinenv
D: opening  db index       /home/chroot/var/lib/rpm/Packages create mode=0x42
D: sanity checking 1 elements
D: opening  db index       /home/chroot/var/lib/rpm/Name create mode=0x42
D: running pre-transaction scripts
D: computing 20 file fingerprints
D: opening  db index       /home/chroot/var/lib/rpm/Basenames create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Group create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Requirename create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Providename create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Conflictname create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Obsoletename create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Triggername create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Dirnames create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Requireversion create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Provideversion create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Installtid create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Sigmd5 create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Sha1header create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Filedigests create mode=0x42
D: opening  db index       /home/chroot/var/lib/rpm/Pubkeys create mode=0x42
Preparando paquetes para la instalación...
D: computing file dispositions
D: 0x00000802     4096    450469192    121281462 /
D: ========== +++ centos-release-6-3.el6.centos.9 x86_64-linux 0x0
error: la apertura de centos-release-6-3.el6.centos.9.x86_64.rpm falló: No such file or directory
D: running post-transaction scripts
D: closed   db index       /home/chroot/var/lib/rpm/Pubkeys
D: closed   db index       /home/chroot/var/lib/rpm/Filedigests
D: closed   db index       /home/chroot/var/lib/rpm/Sha1header
D: closed   db index       /home/chroot/var/lib/rpm/Sigmd5
D: closed   db index       /home/chroot/var/lib/rpm/Installtid
D: closed   db index       /home/chroot/var/lib/rpm/Provideversion
D: closed   db index       /home/chroot/var/lib/rpm/Requireversion
D: closed   db index       /home/chroot/var/lib/rpm/Dirnames
D: closed   db index       /home/chroot/var/lib/rpm/Triggername
D: closed   db index       /home/chroot/var/lib/rpm/Obsoletename
D: closed   db index       /home/chroot/var/lib/rpm/Conflictname
D: closed   db index       /home/chroot/var/lib/rpm/Providename
D: closed   db index       /home/chroot/var/lib/rpm/Requirename
D: closed   db index       /home/chroot/var/lib/rpm/Group
D: closed   db index       /home/chroot/var/lib/rpm/Basenames
D: closed   db index       /home/chroot/var/lib/rpm/Name
D: closed   db index       /home/chroot/var/lib/rpm/Packages
D: closed   db environment /home/chroot/var/lib/rpm
/home/chroot/var/lib/rpm: No such file or directory
D: removed  db environment /home/chroot/var/lib/rpm

我似乎找不到原因,因为所有文件/目录都存在,并且无法修复它。有什么建议吗?

谢谢!

4

1 回答 1

0

我刚刚在我的机器上尝试了你所说的一切,它奏效了。

尝试以下事情:

1:确保您使用最新的 rpm 版本。就我而言,它是 4.9

2:不要下载rpm,从/usr/src执行“rpm -i”。可能是权限问题。

3:确保你使用 sudo

4:检查/home/chroot/var/lib/rpm的权限。应该是 755

祝你好运 !!

于 2012-12-28T19:36:33.483 回答