Announcement

Collapse
No announcement yet.

updates keep failing: Cannot obtain lock

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] updates keep failing: Cannot obtain lock

    When I try to update Kubuntu (only the packagekit package was left) it says "Cannot obtain lock: E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

    But trying to run that it gives me another error:
    "dpkg: dependency problems prevent configuration of packagekit-tools:
    packagekit-tools depends on packagekit (= 1.2.5-2ubuntu3); however:
    Package packagekit is not installed.

    dpkg: error processing package packagekit-tools (--configure):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:
    packagekit-tools
    "

    So it seems Kubuntu would like to update packagekit but dpkg thinks it is not installed.
    When I look at installed packages it says that packagekit is actually installed.

    It seems to prevent any other update that came after.

    In case you would like to ask why I did not update to 24.04.1. Some software of mine was upgraded and does not work as good as the old one and I fear I would have to upgrade the software if I upgrade the Linux version (because thats how it was in Manj).

    Operating System: Kubuntu 22.04
    KDE Plasma Version: 5.24.7
    KDE Frameworks Version: 5.92.0
    Qt Version: 5.15.3
    Kernel Version: 5.15.0-124-generic (64-bit)
    Graphics Platform: X11
    Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
    Memory: 15,5 GiB of RAM
    Graphics Processor: NVIDIA GeForce RTX 2080/PCIe/SSE2​
    Last edited by Fred-VIE; Dec 16, 2024, 11:30 AM.

    #2
    here a screener of the app showing that it is installed
    Attached Files

    Comment


      #3
      Moving this to the correct place, the 22.04 section.

      Now, Discover shows package 'titles' or human-readable names, if you will, as opposed to physical package names, which apt uses. 'Discover' for example is actually 'plasma-discover'
      1. Are you still seeing the "Cannot obtain lock:" when attempting to update?
      2. Have you actually tried to install the package apt wants (sudo apt install packagekit or sudo apt -f install which will also try to install any other missing packages caused by the interrupted update))

      Comment


        #4
        deleted
        Last edited by Fred-VIE; Dec 16, 2024, 12:21 PM.

        Comment


          #5
          I deleted it. Yeah, don't know what you did, but it created a post in a position that shouldn't be possible. Try again.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            I am still seeing the same error. Once when I tried just to update the remaining apps it said some app had crashed but my finger was faster than my brain and I klicked it away.

            No I did not try to install it because installing what is already there did not make much sense to me. I thought about uninstalling/reinstalling though but feared I would destroy even more.

            It does not matter though because trying to install it prompts another error:

            "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to cor
            rect the problem."


            It keeps sending me back to that command that does not work because it claims something is not there that is there.​​

            A true egg/henn problem.

            Comment


              #7
              You can try sudo apt install --reinstall packagekit package-tools
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                That prompts the same response: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

                Maybe I have to restart dpkg somehow?
                Last edited by Fred-VIE; Dec 16, 2024, 01:52 PM.

                Comment


                  #9
                  Originally posted by claydoh View Post
                  sudo apt -f install
                  Have you run this yet?
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Yes, it prompted the same error as mentioned above. It all comes back to that and that is not working either :/

                    Comment


                      #11
                      I have restarted and tried it again.

                      Same result with the packages but the update started and then it stopped prompting:
                      "The PackageKit daemon has crashed."

                      It said that twice with no further info.

                      Edit: I have made a bug report to Ubuntu via the link below the error. Not sure if it was sufficcient because I have never made one before.

                      My problem is now, that I most likely cannot upgrade to V24.04 either because of this issue.
                      Last edited by Fred-VIE; Dec 16, 2024, 04:01 PM.

                      Comment


                        #12
                        I had the exact same thing.
                        Can you install Synaptic.
                        Then Edit > Fix broken packages. (Maybe packagekit is "broken")
                        And maybe highlight packagekit and upgrade it?
                        That got me out of the mess, somehow, for some reason.
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #13
                          I had this exact same issue, used claydoh's response and ran sudo apt -f install packagekit
                          Solved my issues.

                          Comment


                            #14
                            Originally posted by Qqmike View Post
                            Can you install Synaptic.
                            Synaptic is installed, when I start it I get the same error message like with everything else (pic).

                            All "solutions" prompt me to use "sudo dpkg --configure -a" which does not work because it comes back with a "packet/dependency not installed" error. Including reinstalling/repairing/upgrading the package.

                            It actually all started with the autoupdate wanting to update that package which failed and told me above "solution".


                            vioke done that and failed, see above

                            And btw., when I try to uninstall packagekit it says "too few items to process", so it shows installed but is not, at least the system seems to think that way even though it shows it as installed.

                            So howto uninstall something that is not installed and install something, that does not allow it because of supposed config problems?

                            Edt.: I have not installed anything new for months. All I did was autoupdating existing apps.
                            Attached Files
                            Last edited by Fred-VIE; Dec 17, 2024, 11:36 AM.

                            Comment


                              #15
                              Today I ran all commands, you have asked me to try, again.

                              Unlike yesterday, the command "sudo apt -f install​" did not result in an error message anymore.
                              During that upgrade it said packagekit is being installed and the update is now working again.

                              Thanks everyone!

                              Comment

                              Working...
                              X