Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3594
  • Last Modified:

error: cannot get exclusive lock on /var/lib/rpm/Packages

Hi I am using Redhat 7.1 and I am getting the following errors when using rpm

Start NetWorker daemons at end of install [yes]? n
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm


[root@voyager legatodeps]# rpm -i  rpm-4.0.3-6x.i386.rpm
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm

I logged in as root any ideas whats happening here?
0
dan4sail
Asked:
dan4sail
1 Solution
 
ahoffmannCommented:
sounds like another rpm ist still running
or a previous rpm was aborted unexpected and left its lock file in /var/lib/rpm
what do you get with
  ls -la /var/lib/rmp
0
 
dan4sailAuthor Commented:
[root@voyager legatodeps]# ls -la /var/lib/rpm
total 15745
drwxr-xr-x    2 root     root         1024 Apr 20 13:42 .
drwxr-xr-x   16 root     root         1024 Apr 20 13:52 ..
-rw-r--r--    1 root     root      2695168 Apr 21 12:07 Basenames
-rw-r--r--    1 root     root        12288 Apr 20 13:51 Conflictname
-rw-r--r--    1 root     root        12288 Apr 21 12:07 Group
-rw-r--r--    1 root     root        24576 Apr 21 12:07 Name
-rw-r--r--    1 root     root     13168640 Apr 21 12:07 Packages
-rw-r--r--    1 root     root        90112 Apr 21 12:07 Providename
-rw-r--r--    1 root     root       118784 Apr 21 12:07 Requirename
-rw-r--r--    1 root     root        12288 Apr 20 13:51 Triggername
0
 
ahoffmannCommented:
> error: cannot get exclusive lock on /var/lib/rpm/Packages
another process is holding a lock on this file, check with lsof, stop the other process
0
 
ravenplCommented:
verify whether You are root with command: id
identify the locking process with: fuser /var/lib/rpm/Packages
0
 
ircpamanagerCommented:
Definitely check if you are root
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now