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?
dan4sailAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ravenplCommented:
verify whether You are root with command: id
identify the locking process with: fuser /var/lib/rpm/Packages
ircpamanagerCommented:
Definitely check if you are root
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.