LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 01-13-2013, 09:33 AM   #1
gaugeta
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Rep: Reputation: Disabled
Cannot get exclusive/shared lock on database for rpm on AIX 6.1


I was trying to install a python rpm on AIX 6.1 and it was taking too long and so I had to close ther terminal abruptly.

Later when I tried to install the same rpm as root I am getting the problem as :


Code:
root:stud -> $ rpm -i -v python-2.6.7-1.aix5.1.ppc.rpm
cannot get exclusive lock on database
error: cannot open /opt/freeware/packages/packages.rpm
And when I try command as follows I get the shared lock error:
Code:
root:stud -> $ rpm  -qa
cannot get shared lock on database
rpmQuery: rpmdbOpen() failed
BTW I am a root user
How can I correct the same.

Last edited by gaugeta; 01-13-2013 at 09:42 AM.
 
Old 01-13-2013, 10:52 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,418

Rep: Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531
Quote:
Originally Posted by gaugeta View Post
I was trying to install a python rpm on AIX 6.1 and it was taking too long and so I had to close ther terminal abruptly. Later when I tried to install the same rpm as root I am getting the problem as :

Code:
root:stud -> $ rpm -i -v python-2.6.7-1.aix5.1.ppc.rpm
cannot get exclusive lock on database
error: cannot open /opt/freeware/packages/packages.rpm
And when I try command as follows I get the shared lock error:
Code:
root:stud -> $ rpm  -qa
cannot get shared lock on database
rpmQuery: rpmdbOpen() failed
BTW I am a root user How can I correct the same.
Based on your prompt, you're NOT a root user. Typically, the prompt changes from "$" to "#" when you get to root, although we don't know if you modified your prompt (PS1) settings.

That said, if you just killed the terminal window, the process may be hung. Check for an rpm command running/defunct with a "ps -ef | grep -i rpm", and see what it tells you. If there's one present, kill it.
 
1 members found this post helpful.
Old 01-13-2013, 12:05 PM   #3
gaugeta
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
@TB0ne: Thanks a lot.
Worked perfectly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing shared/exclusive locking (readers/writer) lock ruj.sabya Linux - General 2 05-08-2008 04:21 AM
warning: cannot get exclusive lock on /var/lib/rpm/Packages Raafi Fedora 3 03-06-2005 03:45 AM
error: cannot get exclusive lock on /var/lib/rpm/Packages orly Linux - Software 2 09-06-2004 07:13 AM
adding a specific shared library file to the rpm database ravalox Linux - Software 0 06-13-2004 01:18 AM
error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages inward_eye Linux - Software 3 08-24-2003 03:07 PM


All times are GMT -5. The time now is 12:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration