Originally Posted by gaugeta
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 :
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:
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.