Forum

Yampiz Forum

Sharing let knowledge Spreaded, Reading let spirits growth, Creative let culture extended, Let us
  • 禁止廣告文
  • 知識傳播
  • 閱讀
  • 心靈成長
  • 創作
  • 文化傳承
Forum Dictionary / PC / Linux 討論版 / Server /

無法正確使用 rpm -ql 的問題

New Subject
Random
Previous
Next
|
無法正確使用 rpm -ql 的問題

今天工作上遇到作 rpm 查詢套件如 rpm -qa | grep mysql 或是執行" yum "命令會出現錯誤如下:

rpmdb: Lock table is out of available locker entries
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

在網路上找了一下可以按照如下操作來修復它:

1.操作之前請先備份 /var/lib/rpm :
tar cvzf rpmdb-backup.tar.gz /var/lib/rpm

2.刪除rpm的BDB數據庫:
rm /var/lib/rpm/__db.00*

3.重建立 rpm 使用的數據庫,注意:此處可能需要一點時間:
rpm --rebuilddb

4.檢查 rpm 是否一切正常:
rpm -qa | sort

為什麼為發生這個問題呢?
其實當您用 rpm 命令後,rpm 訪問 BDB 數據庫,首先會設置一個臨時鎖。如果在它運行時您用 control-c 中斷它,或者是給它發了中斷信號。那麼 rpm 就很可能會出錯誤。因為這個臨時鎖還沒有被釋放呢。

  • Keywords : error, 數據庫, rpmdb, cannot, Packages, 重建立, 釋放呢, 訪問, 網路上找, 為發生這, 注意, 此處, 檢查, 查詢套件如, 會出錯誤, 操作, 您用, 它運行, 它發, 執行
0 0
2009-06-12T17:42:59+0000


  • Now, you can post comments by Facebook Account when your Yampiz account was logout or unvariable. whatever, we suggest to post comment by Yampiz Account to get more bounds to join new events of Heyxu
Comment
 
Verify

Facebook Page

QR-Code and APP Launcher

User Guide
This Webpage

In those service tabs, "Scan QRCode, in mobile device" or "Click the button, in this device" to open webpage or APP-related operations.
QRCode
  • Auto Platform
    For better browsing experience, it will auto detects your device to display webpage.
  • Bug Report
    Tell us about the idea, problem and errors you found.
  • Comodo Secure
    The sensitive data transmission adopts by SSL-2048 authenticated encryption.
  • Copyright
    © 2009 YamPiz Digital Inc. & Jaby Group. All rights reserved.
  • Revised Version
    V2.2.197
    29 Oct 2024 (GMT+8)