Announcement

Collapse
No announcement yet.

Updating Not Working

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Updating Not Working

    I installed KDE about a week ago. Now I need to update 131 packages!

    When I try to install from the panel, I get a list of the 131 packages which are available. When I 'update all', nothing happens for a while, then:

    Error messages flash up briefly, similar to 'E: could not get lock var/lib/...' and 'E: unable to lock the administration directory...'

    howard@Snow-White:~$ apt-get -f install
    E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
    howard@Snow-White:~$ sudo apt-get -f install
    [sudo] password for howard:
    E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
    howard@Snow-White:~$

    AFAIK I am not root although I installed Samba for file sharing recently. From the terminal I am not on # but $.
    I started off trying to run Rhythmbox but got an error similar to: GStreamer required for this installation. As is the way with Linux, I ended up trying to solve a seemingly different problem

    I'd be grateful for any advice. Thanks!

    #2
    I got the same thing this morning when trying to update Kubuntu 18.04. It seems that Discover wants to do the updating, so when I used that program it went OK.

    Comment


      #3
      Thanks, but it is just the same with Discover (18.04).

      Comment


        #4
        Open a Konsole and issue
        sudo rm /var/lib/dpkg/lock
        sudo apt update
        sudo apt full-upgrade
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Thanks a lot!

          I ran into trouble at: sudo apt full-upgrade.

          howard@Snow-White:~$
          howard@Snow-White:~$ sudo rm /var/lib/dpkg/lock
          [sudo] password for howard:
          howard@Snow-White:~$ sudo apt update
          Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
          Hit:2 http://ppa.launchpad.net/eugenesan/ppa/ubuntu bionic InRelease
          Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
          Hit:4 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease
          Get:5 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
          Fetched 158 kB in 1s (236 kB/s)
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          133 packages can be upgraded. Run 'apt list --upgradable' to see them.
          howard@Snow-White:~$ sudo apt full-upgrade
          E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
          howard@Snow-White:~$ sudo dpkg --configure -a
          howard@Snow-White:~$ sudo apt full-upgrade
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          Calculating upgrade... Done
          E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
          E: Unable to lock directory /var/cache/apt/archives/
          howard@Snow-White:~$

          I checked with the File Manager and I can open Root. I don't know exactly how I became root as I am pretty sure I have a separate root password which I did not use. I did install Samba recently and there is a red square top left in the File Manager page.

          Comment


            #6
            Let's go one level deeper then:
            sudo rm /var/cache/apt/archives/lock
            sudo rm /var/lib/apt/lists/lock
            sudo dpkg --configure -a
            sudo apt -f install
            sudo apt update
            sudo apt full-upgrade
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Hmm...not so good. I didn't copy the entire output - pages of it. This is the last section:

              Fetched 133 MB in 13s (10.1 MB/s)
              debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable.
              (Reading database ... 224174 files and directories currently installed.)
              Preparing to unpack .../ttf-mscorefonts-installer_3.6ubuntu2_all.deb ...
              debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
              dpkg: error processing archive /var/cache/apt/archives/ttf-mscorefonts-installer_3.6ubuntu2_all.deb (--unpack):
              new ttf-mscorefonts-installer package pre-installation script subprocess returned error exit status 1
              Preparing to unpack .../python3-minimal_3.6.5-3ubuntu1_amd64.deb ...
              Unpacking python3-minimal (3.6.5-3ubuntu1) over (3.6.5-3) ...
              Errors were encountered while processing:
              /var/cache/apt/archives/ttf-mscorefonts-installer_3.6ubuntu2_all.deb
              E: Sub-process /usr/bin/dpkg returned an error code (1)
              howard@Snow-White:~$

              Discover still tells me there are 132 files to update.

              Comment


                #8
                IIRC, the ttf-mscorefonts-installer_3.6ubuntu2_all.deb package opens a console based red, gray and blue GUI that requires you to check "Yes" for M$'s EULA. On my system it popped UNDER the Muon gui and only by luck did I see it. It should have popped on top of other GUI in modal fashion, not modless.

                At this point you can repeat these two commands several times
                sudo dpkg --configure -a
                sudo apt -f install

                or you can delete:
                /var/cache/apt/archives/ttf-mscorefonts-installer_3.6ubuntu2_all.deb

                then repeat those commands several times.

                A more serious approach would be to delete all the files in
                /var/cache/apt/archives/
                and then do
                sudo apt update
                to rebuild it from the sources.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  It's late with me and I will think more clearly in the morning. Thanks for your help and interest, GreyGeek. I will post here again tomorrow.

                  Comment


                    #10
                    Originally posted by GreyGeek View Post
                    At this point you can repeat these two commands several times
                    sudo dpkg --configure -a
                    sudo apt -f install

                    or you can delete:
                    /var/cache/apt/archives/ttf-mscorefonts-installer_3.6ubuntu2_all.deb
                    then repeat those commands several times.
                    The Konsole reported permission denied when I tried to delete the /var/cache/apt/archives/ttf-mscorefonts-installer_3.6ubuntu2_all.deb file. Oddly enough, when I checked the /var directory it had disappeared.

                    I then ran the top two commands. These seemed to run their routines normally, but at the end Discover said I still had 129 packages to update. I do not know if these were additional to the original 131, but they installed correctly with Discover.

                    Thanks again!

                    Comment


                      #11
                      Updating Not Working

                      Glad to help!

                      I’m not a fan of Discover. On my system it seems slow to update my repository status and many times the update icon stays in the system tray after it’s done, telling me I have updates.

                      When I see the update icon I always open a Konsole and issue
                      sudo apt update
                      sudo apt full-upgrade

                      If, in the list of updates waiting to come down, I see anything relating to kernels, printers, networking or GPUs I choose “n” to abort the update process, switch to root using “sudo -i”, and then I create snapshots of my @ and @home subvolumes. Then I exit root and redo the “sudo apt full-upgrade”, using the up arrow to find that command, then hitting the Enter key. If something breaks and a quick analysis indicates the fix may be involved I do a rollback and wait for future updates to fix things.
                      99% of the time, however, the update is golden.
                      Last edited by GreyGeek; Jul 13, 2018, 09:20 AM.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment

                      Working...
                      X