rpmdb: Lock table is out of available locker entries
เกิดอาการแปลกประหลาดของเซิร์ฟเวอร์ (CentOS 5.2) เมื่อสั่ง yum หรือ rpm จะเกิดเออเรอร์แจ้งว่า
[root@www ~]# rpm -ivh php-mssql-5.1.6-15.el5.centos.1.x86_64.rpm
rpmdb: Lock table is out of available locker entries
rpmdb: Unknown locker ID: 7bd
error: db4 error(22) from db->close: Invalid argument
error: cannot open Packages index using db3 – Cannot allocate memory (12)
error: cannot open Packages database in /var/lib/rpm
warning: php-mssql-5.1.6-15.el5.centos.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
rpmdb: Lock table is out of available locker entries
rpmdb: Unknown locker ID: 7be
error: db4 error(22) from db->close: Invalid argument
error: cannot open Packages database in /var/lib/rpm
ซึ่งเป็นอาการค้างของดาต้าเบสของ rpm เอง ซึ่งจะมีลักษณะดังนี้ __db.00*
[root@www ~]# cd /var/lib/rpm/
[root@www rpm]# ls
Basenames __db.001 __db.003 Filemd5s Installtid Packages Provideversion Requirename Sha1header Triggername
Conflictname __db.002 Dirnames Group Name Providename Pubkeys Requireversion Sigmd5
วิธีแก้ไขก็สามารถทำได้ง่าย ๆ คือ
rm /var/lib/rpm/__db.00*
rpm –rebuilddb
เพียงแค่นี้ก็สามารถเรียกใช้งาน rpm และ yum ได้ตามปกติ
[root@www ~]# yum -y install php-mssql.x86_64
Loading “installonlyn” plugin
Loading “fastestmirror” plugin
Loading mirror speeds from cached hostfile
* kbs-CentOS-Extras: centos.karan.org
* base: centosb2.centos.org
* updates: centosq2.centos.org
* addons: centosk2.centos.org
* kbs-CentOS-Testing: centos.karan.org
* extras: centosq2.centos.org
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package php-mssql.x86_64 0:5.1.6-15.el5.centos.1 set to be updated
–> Processing Dependency: libsybdb.so.5()(64bit) for package: php-mssql
–> Running transaction check
—> Package freetds.x86_64 0:0.64-11.el5.centos set to be updated
–> Finished Dependency ResolutionDependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
php-mssql x86_64 5.1.6-15.el5.centos.1 extras 24 k
Installing for dependencies:
freetds x86_64 0.64-11.el5.centos extras 866 kTransaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)Total download size: 890 k
Downloading Packages:
(1/2): freetds-0.64-11.el 100% |=========================| 866 kB 00:13
(2/2): php-mssql-5.1.6-15 100% |=========================| 24 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: freetds ######################### [1/2]
Installing: php-mssql ######################### [2/2]Installed: php-mssql.x86_64 0:5.1.6-15.el5.centos.1
Dependency Installed: freetds.x86_64 0:0.64-11.el5.centos
Complete!