Results 1 to 2 of 2

Thread: How to change rpm lock

  1. #1

    Default How to change rpm lock

    Getting below error when i try to install some rpm files in opensuse leap 15:

    RPM failed: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Read-only file system)

    and /var/lib/rpm/.rpm.lock has below file permission:
    -rw-r--r-- 1 root root 0 Nov 29 16:58 /var/lib/rpm/.rpm.lock

    Tried many ways to change lock through command line and getting below error:
    error: can't create transaction lock on /usr/lib/sysimage/rpm/.rpm.lock (Read-only file system)

    Please help in removing the lock manually or through command line

  2. #2
    Join Date
    Jun 2008

    Default Re: How to change rpm lock


    Welcome to the openSUSE forums.

    Let me please first give you important information on how to post computer commands with their ouput:
    There is an important, but not easy to find feature on the forums.

    Please in the future use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.

    In your case that would look something like
    henk@boven:~> ls -l /var/lib/rpm/.rpm.lock
    -rw-r--r-- 1 root root 0  6 nov  2013 /var/lib/rpm/.rpm.lock
    That said, please note that the error messages say: (Read-only file system).
    Thus they do not talk about the file permissions, but about the file system where the file is on.
    You have to try to find out on which file system the file is on (posibly /var) and then to check if that file system is indeed mounted read-only. I think the command
    mount | grep '/var'
    will help here.
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts