Announcement

Collapse
No announcement yet.

Discover fails to update a package

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

    Discover fails to update a package

    When I run an update from Discover on my computer one of the packages fails to update.
    Code:
    Package failed to install:
    
    Error while installing package: installed initramfs-tools package post-installation script subprocess returned error exit status 1​
    I posted failures like this on another post but I can't find it so I created a new one. Since this problem has occurred several times on different packages then maybe there is a bug hiding in the code.
    Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

    http://www.kubuntu.org/getkubuntu

    #2
    Best to update in the Konsole terminal emuluator then to get more information:
    sudo apt update && apt list --upgradable
    sudo apt full-upgrade

    Post the output of sudo apt full-upgrade here (in CODE tags) if the errors differ from your original post.
    And of e.g. df -h to see if your drive is full - if it is see this post and the following ones.
    Last edited by Schwarzer Kater; Mar 23, 2024, 01:23 AM. Reason: typos
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    Comment


      #3
      Originally posted by steve7233 View Post
      I posted failures like this on another post but I can't find it so I created a new one.
      Here are you started topics:

      https://www.kubuntuforums.net/search...2%3A%221%22%7D
      Using Kubuntu Linux since March 23, 2007
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        The same package failed again just now. I will try the terminal tomorrow. I was just going to bed now but thought I would grab today's update first. It didn't work so I will try the terminal when I get up again.
        Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

        http://www.kubuntu.org/getkubuntu

        Comment


          #5
          I forgot to do this yesterday but:
          Code:
          [FONT=monospace][COLOR=#54ff54][B]wilson-test@steve7233-Z68XP-UD3[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ sudo apt update [/COLOR]
          [sudo] password for wilson-test:  
          Hit:1 http://us.archive.ubuntu.com/ubuntu mantic InRelease
          Get:2 http://us.archive.ubuntu.com/ubuntu mantic-updates InRelease [109 kB]
          Get:4 http://security.ubuntu.com/ubuntu mantic-security InRelease [109 kB][COLOR=#b26818]                                   [/COLOR][COLOR=#000000] [/COLOR]
          Hit:3 https://repo.atlasvpn.com/debian stable InRelease[COLOR=#b26818]  [/COLOR][COLOR=#000000] [/COLOR]
          Fetched 217 kB in 1s (220 kB/s)
          Reading package lists... Done
          Building dependency tree... Done
          Reading state information... Done
          10 packages can be upgraded. Run 'apt list --upgradable' to see them.
          [COLOR=#b26818]N: [/COLOR][COLOR=#000000]Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://repo.atlasvpn.com/deb[/COLOR]
          ian stable InRelease' doesn't support architecture 'i386'
          [COLOR=#54ff54][B]wilson-test@steve7233-Z68XP-UD3[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ sudo apt upgrade [/COLOR]
          Reading package lists... Done
          Building dependency tree... Done
          Reading state information... Done
          Calculating upgrade... Done
          The following packages were automatically installed and are no longer required:
           chromium-codecs-ffmpeg-extra crda fonts-lao fonts-sil-abyssinica fonts-tibetan-machine
           fonts-tlwg-garuda-ttf fonts-tlwg-laksaman fonts-tlwg-laksaman-ttf fonts-tlwg-purisa fonts-tlwg-purisa-ttf
           fonts-tlwg-typist fonts-tlwg-typist-ttf fonts-tlwg-typo-ttf fonts-tlwg-umpush-ttf fonts-tlwg-waree-ttf
           gdisk libavutil57:i386 libblockdev-loop2 libblockdev-swap2 libblockdev-utils2 libgeos3.11.1
           libgupnp-igd-1.0-4 libhavege2 libmujs2 libparted-fs-resize0 libpoppler126 libqt5script5 libraw20
           libspatialite7 libssl1.1 libsuitesparseconfig5 libsuperlu5 linux-modules-6.2.0-39-generic
           linux-modules-6.5.0-17-generic linux-modules-6.5.0-21-generic linux-modules-extra-6.2.0-39-generic
           linux-modules-extra-6.5.0-17-generic linux-modules-extra-6.5.0-21-generic
           linux-objects-nvidia-525-6.2.0-37-generic linux-objects-nvidia-525-6.2.0-39-generic
           linux-objects-nvidia-525-server-6.2.0-39-generic linux-objects-nvidia-525-server-6.5.0-17-generic
           linux-objects-nvidia-535-6.5.0-17-generic linux-objects-nvidia-535-6.5.0-21-generic
           nvidia-firmware-535-535.154.05 python3-freetype python3-py python3-rlpycairo
          Use 'sudo apt autoremove' to remove them.
          The following packages have been kept back:
           libpulse-mainloop-glib0 libpulse0 libpulse0:i386 libpulsedsp pulseaudio pulseaudio-utils snapd
          The following packages will be upgraded:
           curl libcurl3-gnutls libcurl4
          3 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
          3 not fully installed or removed.
          3 standard LTS security updates
          Need to get 848 kB of archives.
          After this operation, 0 B of additional disk space will be used.
          Do you want to continue? [Y/n] y
          Get:1 http://security.ubuntu.com/ubuntu mantic-security/main amd64 curl amd64 8.2.1-1ubuntu3.3 [216 kB]
          Get:2 http://security.ubuntu.com/ubuntu mantic-security/main amd64 libcurl4 amd64 8.2.1-1ubuntu3.3 [319 kB]
          Get:3 http://security.ubuntu.com/ubuntu mantic-security/main amd64 libcurl3-gnutls amd64 8.2.1-1ubuntu3.3 [313
          kB]
          Fetched 848 kB in 1s (1,406 kB/s)[COLOR=#b26818]        [/COLOR][COLOR=#000000] [/COLOR]
          (Reading database ... 318788 files and directories currently installed.)
          Preparing to unpack .../curl_8.2.1-1ubuntu3.3_amd64.deb ...
          Unpacking curl (8.2.1-1ubuntu3.3) over (8.2.1-1ubuntu3.2) ...
          Preparing to unpack .../libcurl4_8.2.1-1ubuntu3.3_amd64.deb ...
          Unpacking libcurl4:amd64 (8.2.1-1ubuntu3.3) over (8.2.1-1ubuntu3.2) ...
          Preparing to unpack .../libcurl3-gnutls_8.2.1-1ubuntu3.3_amd64.deb ...
          Unpacking libcurl3-gnutls:amd64 (8.2.1-1ubuntu3.3) over (8.2.1-1ubuntu3.2) ...
          Setting up initramfs-tools (0.142ubuntu15.1) ...
          update-initramfs: deferring update (trigger activated)
          Setting up linux-image-6.5.0-25-generic (6.5.0-25.25) ...
          Setting up libcurl3-gnutls:amd64 (8.2.1-1ubuntu3.3) ...
          Setting up libcurl4:amd64 (8.2.1-1ubuntu3.3) ...
          Setting up curl (8.2.1-1ubuntu3.3) ...
          Setting up linux-image-6.5.0-26-generic (6.5.0-26.26) ...
          I: /boot/initrd.img is now a symlink to initrd.img-6.5.0-26-generic
          Processing triggers for man-db (2.11.2-3) ...
          Processing triggers for libc-bin (2.38-1ubuntu6.1) ...
          Processing triggers for initramfs-tools (0.142ubuntu15.1) ...
          update-initramfs: Generating /boot/initrd.img-6.5.0-25-generic
          cpio: write error: No space left on device
          E: mkinitramfs failure uncompressed cpio 2
          update-initramfs: failed for /boot/initrd.img-6.5.0-25-generic with 1.
          [COLOR=#000000][B]dpkg:[/B][/COLOR][COLOR=#000000] error processing package initramfs-tools (--configure): [/COLOR]
          installed initramfs-tools package post-installation script subprocess returned error exit status 1
          Processing triggers for linux-image-6.5.0-25-generic (6.5.0-25.25) ...
          /etc/kernel/postinst.d/initramfs-tools:
          update-initramfs: Generating /boot/initrd.img-6.5.0-25-generic
          cpio: write error: No space left on device
          E: mkinitramfs failure uncompressed cpio 2
          update-initramfs: failed for /boot/initrd.img-6.5.0-25-generic with 1.
          run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
          [COLOR=#000000][B]dpkg:[/B][/COLOR][COLOR=#000000] error processing package linux-image-6.5.0-25-generic (--configure): [/COLOR]
          installed linux-image-6.5.0-25-generic package post-installation script subprocess returned error exit status
          1
          Processing triggers for linux-image-6.5.0-26-generic (6.5.0-26.26) ...
          /etc/kernel/postinst.d/initramfs-tools:
          update-initramfs: Generating /boot/initrd.img-6.5.0-26-generic
          cpio: write error: No space left on device
          E: mkinitramfs failure uncompressed cpio 2
          update-initramfs: failed for /boot/initrd.img-6.5.0-26-generic with 1.
          run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
          [COLOR=#000000][B]dpkg:[/B][/COLOR][COLOR=#000000] error processing package linux-image-6.5.0-26-generic (--configure): [/COLOR]
          installed linux-image-6.5.0-26-generic package post-installation script subprocess returned error exit status
          1
          Errors were encountered while processing:
          initramfs-tools
          linux-image-6.5.0-25-generic
          linux-image-6.5.0-26-generic
          [COLOR=#ff5454][B]E: [/B][/COLOR][COLOR=#000000]Sub-process /usr/bin/dpkg returned an error code (1) [/COLOR]
          [COLOR=#54ff54][B]wilson-test@steve7233-Z68XP-UD3[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$  [/COLOR][/FONT]
          
          
          ​
          some things updated but initramfs-tools still throws exit code 1. I have boot problems and Grub II ALWAYS fails to boot Kubuntu - the only OS that is installed -, and goes to the Grub menu and I always have to select recovery mode and then the option to continue the boot. Checking the no space left on device error:
          Code:
          [FONT=monospace][COLOR=#54ff54][B]wilson-test@steve7233-Z68XP-UD3[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ df [/COLOR]
          Filesystem      1K-blocks       Used Available Use% Mounted on
          tmpfs             1621908       1812   1620096   1% /run
          /dev/sdc1       976502784  715281108 260637756  74% /
          tmpfs             8109528     192888   7916640   3% /dev/shm
          tmpfs                5120         16      5104   1% /run/lock
          /dev/sdc1       976502784  715281108 260637756  74% /home
          /dev/sdc2          231336     151912     61504  72% /boot
          /dev/sda1      3907016704 3648662272 256366912  94% /steam1
          tmpfs             8109528          0   8109528   0% /run/qemu
          tmpfs             1621904         76   1621828   1% /run/user/1001
          [COLOR=#54ff54][B]wilson-test@steve7233-Z68XP-UD3[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ [/COLOR][/FONT]
          
          ​
          / is only 74% used and /boot is 72% used.
          Last edited by steve7233; Mar 27, 2024, 10:07 AM.
          Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

          http://www.kubuntu.org/getkubuntu

          Comment


            #6
            What about this?:

            cpio: write error: No space left on device

            Please Read Me

            Comment


              #7
              So in Konsole
              • sudo apt autoremove --purge
                Warning: Read the output carefully and be sure that you really want to remove these (alleged useless) packages!
              • and
                sudo apt autoclean
              • reboot
              Afterwards you should have enough free space and be able to update again.

              PS:
              /boot is quite small (just a bit more than 200 MB I think - you did not use the -h flag with df…) - next time you better make it about 2 GB to be on the safe side, especially with Nvidia.
              And regularly use apt autoremove in the future or you will soon be out of free space again.
              Last edited by Schwarzer Kater; Mar 27, 2024, 10:29 AM.
              Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
              Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

              get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
              install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

              Comment


                #8
                Originally posted by Schwarzer Kater View Post
                /boot is quite small (just a bit more than 200 MB I think - you did not use the -h flag with df…) - next time you better make it about 2 GB to be on the safe side, especially with Nvidia.
                And regularly use apt autoremove in the future or you will soon be out of free space again.
                FYI, my /boot contains only 2 kernels and it's over 300MB.

                Not sure why almost anyone has a separate boot anymore, but clearly at least 512MB or 1GB is needed.


                Please Read Me

                Comment


                  #9
                  Originally posted by oshunluvr View Post

                  FYI, my /boot contains only 2 kernels and it's over 300MB.

                  Not sure why almost anyone has a separate boot anymore, but clearly at least 512MB or 1GB is needed.
                  Boot Repair recommended a separate boot partition. Probably because I use the BTRFS file system on Large SSDs. I will go into KDEpartion manager and adjust / and /boot. Hopefully, this will solve my boot problems after I get initramfs-tools updated. Damn you NVIDIA! I should have realized the NVIDIA kernel modules -drivers as Micro$ft calls them -, would be a memory hog.
                  Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                  http://www.kubuntu.org/getkubuntu

                  Comment


                    #10
                    Originally posted by steve7233 View Post
                    […] I will go into KDEpartion manager and adjust / and /boot. […]
                    I suggest booting from a GParted live USB to alter your partitions (and to have a working backup of your important data!!!).
                    For me KDE Partition Manager has rendered drives/partitions unusable several times during the last ten years - GParted has not once (this may have been individual bad luck, but I thought I should share this).

                    Beware that the UUIDs may have changed afterwards.
                    Last edited by Schwarzer Kater; Mar 27, 2024, 12:14 PM.
                    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                    Comment


                      #11
                      Originally posted by steve7233 View Post

                      Boot Repair recommended a separate boot partition. Probably because I use the BTRFS file system on Large SSDs. I will go into KDEpartion manager and adjust / and /boot. Hopefully, this will solve my boot problems after I get initramfs-tools updated. Damn you NVIDIA! I should have realized the NVIDIA kernel modules -drivers as Micro$ft calls them -, would be a memory hog.
                      BTRFS needed a separate boot partition about 15 years ago because GRUB couldn't read BTRFS at the time.

                      IF IT WERE ME: I would NOT resize my partitions or any of that dangerous stuff.

                      I would simply COPY the contents of the mounted /boot partition into the /boot folder, remove /boot from /etc/fstab, out of an abundance of caution - run update-grub and grub-install - and reboot. I seriously doubt the 200MB you would lose will be noticed. Then the next time you do a new install wipe the slate clean with a new partition layout.

                      Steps to do this:

                      Unmount /boot
                      Make a new place to re-mount /boot and mount it there
                      Copy all the files from the boot partition into /boot
                      Edit /etc/fstab and remark out the /boot mount line (add a hash in the front of that line)
                      Run grub-install and update-grub

                      Commands:

                      sudo umount /boot
                      sudo mkdir /oldboot
                      sudo mount /dev/sdc2/ /oldboot
                      sudo cp -Rp /oldboot/* /boot
                      sudo nano /etc/fstab
                      < put a # in from of the line containing /boot and save>
                      sudo grub-install /dev/sdc
                      sudo update-grub
                      reboot

                      I assumed /dev/sdc is your boot drive. Change the command if not.

                      Since you've only made a copy of what's in /boot without deleting or endangering anything, you can revert back if you have to from a liveUSB - have one handy.

                      Once you're booted back up, THEN if you still want to recover the sdc2 space you can consider deleting it and expanding sdc1 - but you might just as well leave it be.

                      Please Read Me

                      Comment


                        #12
                        Originally posted by oshunluvr View Post
                        […]
                        IF IT WERE ME: I would NOT resize my partitions or any of that dangerous stuff.

                        I would simply COPY the contents of the mounted /boot partition into the /boot folder, remove /boot from /etc/fstab, out of an abundance of caution - run update-grub and grub-install - and reboot. I seriously doubt the 200MB you would lose will be noticed. Then the next time you do a new install wipe the slate clean with a new partition layout.
                        […]
                        steve7233
                        The suggestion "Bye-bye /boot partition" and "Hello actual /boot directory" is a very good one!
                        If the only reason you created a /boot partition was "Boot Repair recommended this". I am no fan of this application at all…
                        Last edited by Schwarzer Kater; Mar 27, 2024, 01:26 PM.
                        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                        Comment


                          #13
                          When I ran boot repair it said that my boot information was far from the start of the drive so it recommended a separate boot partition.
                          Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                          http://www.kubuntu.org/getkubuntu

                          Comment


                            #14
                            This may be reasonable with HDDs (as it may be reasonable to put a swap partition at the beginning of a HDD), but with SSDs it more or less does not matter anymore on which position your ESP is… (it must still reside in the first 2.2 Terabytes of the disk AFAIK).
                            (OEM) Windows installations often don't put the ESP on a physical /dev/***1 by the way.
                            Last edited by Schwarzer Kater; Mar 28, 2024, 02:03 AM.
                            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                            get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                            install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                            Comment


                              #15
                              As you can see in the df in comment #5, I have a 1,2, and 4 TB SSD. Not Sure Where that error message comes from. Maybe it is just a result of sloppy code.
                              Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                              http://www.kubuntu.org/getkubuntu

                              Comment

                              Working...
                              X