Cannot get shared lock on database for rpm on AIX 6.1

Hello,

I was trying to install python on aix and it was taking too long and I closed the terminal.
Now when i issue the command

rpm -qa

instead of getting all the rpms installed I'm getting the following error.

root:stud -> $ rpm -qa
cannot get shared lock on database
rpmQuery: rpmdbOpen() failed

How can I correct this.

And if I tried to install an rpm package as :

$ rpm -i -v python-2.6.7-1.aix5.1.ppc.rpm
I get the error as :
cannot get exclusive lock on database
error: cannot open /opt/freeware/packages/packages.rpm

BTW I am a root user.

It looks like you have a rpm process running which has got an exclusive lock on RPM database. I suggest you to check your process status report and kill if found.

ps -eaf | grep -i rpm | grep -v grep
1 Like

@bipinajith:Thanks for the reply.
This worked perfectly.