Announcement

Collapse
No announcement yet.

Software Will Not Install Or Remove

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

    [RESOLVED] Software Will Not Install Or Remove

    Hi. Long time lurker first time poster. I have fixed many issues by doing some research. That being said I can't find a solution for this one. The Discover Software Center installed some updates and when my computer rebooted it showed that there was a problem with the offline updates and returned an error code 1. Now I can't install or reinstall any software at all whether I'm using Discover or the CLI. Everything I try returns an error code 1. None of the potential fixes I've read about will work because of this. With hat in hand I'd like to ask if someone could please help me to figure this one out.

    #2
    Hello dwh367, Welcome to the forum.
    I guess the questions would be what have you already tried.
    Give us the out put of the CLI command
    Code:
    sudo dpkg -configure -a
    to start with.
    Dave Kubuntu 20.04 Registered Linux User #462608

    Wireless Script: http://ubuntuforums.org/showthread.p...5#post12350385

    Comment


      #3
      Originally posted by dwh367 View Post
      when my computer rebooted it showed that there was a problem with the offline updates and returned an error code 1. Now I can't install or reinstall any software at all whether I'm using Discover or the CLI. Everything I try returns an error code 1
      We do need to know what you tried to remedy this. Most if not all information out there has little bearing to the relatively recent usage of offline updates, and may be irrelevant to this.

      But the first steps toward fixing this:
      • Disable offline updates via System Settings, and try updating again. I do not believe a reboot or anything is required after doing this. This might be enough to clear the issue by itself. If not:
      • Run sudo apt update in the terminal. Report any errors. You may see packages being 'held". This can be normal, but report this anyway, just in case. Then:
      • Run sudo apt full-upgrade. Report any errors shown here.
      Any errors showing in the last two will point to where the actual problem lies, and will help determine the course of action to take, if the first doesn't clear out the broken Offline Update session.

      Comment


        #4
        Originally posted by kc1di View Post
        Hello dwh367, Welcome to the forum.
        I guess the questions would be what have you already tried.
        Give us the out put of the CLI command
        Code:
        sudo dpkg -configure -a
        to start with.
        Here's the output you asked for. By the way I'm an amateur radio operator myself. I have a 9 call but I live in 4 land now.

        sudo dpkg --configure -a
        dpkg: dependency problems prevent configuration of shim-signed:
        shim-signed depends on grub-efi-amd64-signed (>= 1.187.2~) | grub-efi-arm64-signed (>= 1.187.2~); however:
        Package grub-efi-amd64-signed is not configured yet.
        Package grub-efi-arm64-signed is not installed.

        dpkg: error processing package shim-signed (--configure):
        dependency problems - leaving unconfigured
        Setting up dpkg (1.21.1ubuntu2.1) ...
        head: error reading 'info.bak': Is a directory
        dpkg: error processing package dpkg (--configure):
        installed dpkg package post-installation script subprocess returned error exit status 1
        Errors were encountered while processing:
        shim-signed
        dpkg

        Comment


          #5
          Originally posted by claydoh View Post

          We do need to know what you tried to remedy this. Most if not all information out there has little bearing to the relatively recent usage of offline updates, and may be irrelevant to this.

          But the first steps toward fixing this:
          • Disable offline updates via System Settings, and try updating again. I do not believe a reboot or anything is required after doing this. This might be enough to clear the issue by itself. If not:
          • Run sudo apt update in the terminal. Report any errors. You may see packages being 'held". This can be normal, but report this anyway, just in case. Then:
          • Run sudo apt full-upgrade. Report any errors shown here.
          Any errors showing in the last two will point to where the actual problem lies, and will help determine the course of action to take, if the first doesn't clear out the broken Offline Update session.

          Updates are set to manual and offline updates have been disabled:

          sudo apt update
          Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
          Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease
          Hit:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
          Hit:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
          Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
          Reading package lists... Done
          Building dependency tree... Done
          Reading state information... Done
          1 package can be upgraded. Run 'apt list --upgradable' to see it.

          ​apt list --upgradable
          ubuntu-advantage-desktop-daemon/jammy-updates 1.10~22.04.1 amd64 [upgradable from: 1.9~22.04.1]
          N: There are 2 additional versions. Please use the '-a' switch to see them.

          apt list --upgradable -a
          Listing... Done
          ubuntu-advantage-desktop-daemon/jammy-updates 1.10~22.04.1 amd64 [upgradable from: 1.9~22.04.1]
          ubuntu-advantage-desktop-daemon/now 1.9~22.04.1 amd64 [installed,upgradable to: 1.10~22.04.1]
          ubuntu-advantage-desktop-daemon/jammy 1.8 amd64

          sudo apt full-upgrade
          Reading package lists... Done
          Building dependency tree... Done
          Reading state information... Done
          Calculating upgrade... Done
          Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
          libopenexr25 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6
          libeditorconfig0 libmagickcore-6.q16-6 imagemagick-6-common
          Learn more about Ubuntu Pro at https://ubuntu.com/pro
          The following packages have been kept back:
          ubuntu-advantage-desktop-daemon
          0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
          3 not fully installed or removed.
          After this operation, 0 B of additional disk space will be used.
          Do you want to continue? [Y/n] y
          perl: warning: Setting locale failed.
          perl: warning: Please check that your locale settings:
          LANGUAGE = "",
          LC_ALL = (unset),
          LC_TIME = "Default.UTF-8",
          LANG = "en_US.UTF-8"
          are supported and installed on your system.
          perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
          locale: Cannot set LC_ALL to default locale: No such file or directory
          Setting up dpkg (1.21.1ubuntu2.1) ...
          head: error reading 'info.bak': Is a directory
          dpkg: error processing package dpkg (--configure):
          installed dpkg package post-installation script subprocess returned error exit status 1
          Errors were encountered while processing:
          dpkg
          E: Sub-process /usr/bin/dpkg returned an error code (1)







          Comment


            #6
            Originally posted by dwh367 View Post
            dpkg: dependency problems prevent configuration of shim-signed:
            You probably need to try to install packages that didn't install at all for whatever reason, as well as the ones that didn't finish being configured after installation ( dpkg)
            First, run sudo apt update, to make sure your package lists are up to date.
            Then try sudo apt -f install first. This command sort of pairs with the dpkg command, in this situation.

            apt -f install tries to install missing dependencies, or packages that didn't install.
            dpkg -configure -a tries to finish the installation of packages that were interrupted for some reason.

            You were only getting half the instruction


            Originally posted by dwh367 View Post
            dpkg: error processing package dpkg (--configure):
            And though confusing as heck, this is probably 100% accurate. It is essentially updating itself.

            However, this beastie may mean that something else is happening, so our common garden variety fixes might not be relevant:
            Originally posted by dwh367 View Post
            head: error reading 'info.bak': Is a directory
            One of your internet finds may be a culprit for this one

            Did any of them tell you to create a backup of something? Say, at /var/lib/dpkg/info.bak​ or something similar?
            The specific file path may be different, but the file/directory may be causing the install scripting to barf.
            You will need to delete that, if this is the case.
            THEN do:

            sudo dpkg -configure -a

            and
            sudo apt -f install
            Last edited by claydoh; Feb 19, 2023, 04:00 PM.

            Comment


              #7
              Did any of them tell you to create a backup of something? Say, at /var/lib/dpkg/info.bak​ or something similar?
              Nobody actually told me to. It was just something I read that might fix it. I deleted the info.bak directory. Didn't help anything though.

              sudo dpkg --configure -a
              dpkg: dependency problems prevent configuration of shim-signed:
              shim-signed depends on grub-efi-amd64-signed (>= 1.187.2~) | grub-efi-arm64-signed (>= 1.187.2~); however:
              Package grub-efi-amd64-signed is not configured yet.
              Package grub-efi-arm64-signed is not installed.

              dpkg: error processing package shim-signed (--configure):
              dependency problems - leaving unconfigured
              Errors were encountered while processing:
              shim-signed

              sudo apt -f install
              Reading package lists... Done
              Building dependency tree... Done
              Reading state information... Done
              0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
              2 not fully installed or removed.
              After this operation, 0 B of additional disk space will be used.
              perl: warning: Setting locale failed.
              perl: warning: Please check that your locale settings:
              LANGUAGE = "",
              LC_ALL = (unset),
              LC_TIME = "Default.UTF-8",
              LANG = "en_US.UTF-8"
              are supported and installed on your system.
              perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
              locale: Cannot set LC_ALL to default locale: No such file or directory
              Setting up grub-efi-amd64-signed (1.187.3~22.04.1+2.06-2ubuntu14.1) ...
              locale: Cannot set LC_ALL to default locale: No such file or directory
              dpkg: error processing package grub-efi-amd64-signed (--configure):
              installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 10
              No apport report written because the error message indicates its a followup error from a previous failure.
              dp
              kg: dependency problems prevent configuration of shim-signed:
              shim-signed depends on grub-efi-amd64-signed (>= 1.187.2~) | grub-efi-arm64-signed (>= 1.187.2~); however:
              Package grub-efi-amd64-signed is not configured yet.
              Package grub-efi-arm64-signed is not installed.

              dpkg: error processing package shim-signed (--configure):
              dependency problems - leaving unconfigured
              Errors were encountered while processing:
              grub-efi-amd64-signed
              shim-signed
              E: Sub-process /usr/bin/dpkg returned an error code (1)


              Comment


                #8
                The package that is giving you problems is the
                Code:
                 Grub-efi-amd64-signed
                package. Is your machine set to boot for EUFI?
                You will need to move that package call out of the way like this
                Code:
                sudo mv /var/lib/dpkg/info/package_name.* /tmp
                (replace package_name with grub-efi-amd64-signed)This will move the offending file to /tmp folder Then do the
                Code:
                sudo apt update
                Code:
                sudo apt full-upgrade
                If this does not work then you can move the file back to /var Good luck.

                Also you might want to try this command
                Code:
                sudo apt autoclean && sudo apt autoremove
                Last edited by Snowhog; Feb 20, 2023, 06:50 AM. Reason: Correct apt upgrade command to full-upgrade
                Dave Kubuntu 20.04 Registered Linux User #462608

                Wireless Script: http://ubuntuforums.org/showthread.p...5#post12350385

                Comment


                  #9
                  I
                  Is your machine set to boot for EUFI?
                  Yes it is. I removed grub-efi-amd64-signed and I also had to do the same with shim-signed as well. At that point I didn't have any updates pending, to test with, so I installed and uninstalled a random package. It works again! Thanks for your help everyone. I appreciate it. I'll refer back to this in the event the same thing happens again later down the road. Have a great day!
                  Last edited by dwh367; Feb 20, 2023, 07:38 AM.

                  Comment


                    #10
                    Glad it worked out for you!
                    Dave Kubuntu 20.04 Registered Linux User #462608

                    Wireless Script: http://ubuntuforums.org/showthread.p...5#post12350385

                    Comment

                    Working...
                    X