How To Rectify Transaction Lock /var/lib/rpm in Linux
1. Remove the db files and rebuild those files again using the following commnds.
Sudo rm -f /var/lib/rpm/__db.00*
Sudo rpm --rebuilddb
Once you executed the above commands all the locks will be freed and you can continue with your instllation.
2. You can also remove the locks by kill all the existing process which is holding the lock on the resource using the following commands.
Sudo ps –ef
The above command will show all the existing process.
Find the process id and kill the ,process using the following command
Kill –9 <process id>
Ps aux | grep yum
Kill -9 process-id