Saturday, October 3, 2009

how to solve urpmi or rpm database locked error?

I'm sure for those using package manager for rpm-based distro had encountered "rpm database locked". For Mandriva users, they will encounter similar error such as "urpmi database locked". Those errors are produced when other application is using rpm or urpmi database and to prevent simultaneous access to those databases. In many cases though, there is no application accessing rpm/urpmi database simultaneously but the stale locks are still there. This could happen when the application accessing the database terminated abnormally.

To overcome this problem, you have to remove the lock files manually. For rpm lock file it is in /var/lib/rpm/.RPMLOCK and urpmi lock file is in /var/lib/urpmi/.LOCK. Depends on what error produced, you need to remove either one. Obviously, for error "urpmi database locked", you need to remove file in /var/lib/urpmi/.LOCK and afterthat if you receive error "rpm database locked", you need to remove the other one. Usually if you receive error "urpmi database locked", you need to remove both stale lock files. This is from my experience.

Have fun!


AleXeNdEr reEz said...

SCOREA elearning business

sertai scorea business untuk menbantu pelajar mencapai kecemerlangan sambil menjana pendapatan lumayan.

hubungi saya untuk keterangan lanjut - radzi UTP (013-4372508)

Chinks.. said...

hey..thanx..tht ws very helpful..! :)