RPM failed: error: can’t create transaction lock on /var/lib/rpm/__db.000

I was trying setting up one server and found error below:

RPM failed: error: can’t create transaction lock on /var/lib/rpm/__db.000

Generally remote root access is not provided on hosting servers and we used normal account to log on to that server and was trying to install/uninstall few things there.We were fine till some time but soon started getting above error.

Step one: Queries some module using rpm -q, and found correct result.

#rpm -q module-name

Step two: Found wrong version of module and now time to remove it. use rpm -e(rase) for removing the module.

#rpm -e module-name

Got some error for dependent module.

Step three: Tried to remove the dependency using same rpm -e command.

#rpm -e dependent-module-name

Got above error in quotes.

After doing some Google, found that we were still logged on with the normal user and running rpm requires superuser access. We generally make this mistake because of the remote login restriction on root user.

For switching to super user:

#su
password: provide password here

Most Commented Posts

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

Segue Artigo

Leave a comment

(required)

(required)