[SOLVED] Generic package post-installation script subprocess returned error exit status 1

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

Yes, I edited that in a bit later. If you save it to your Downloads folder you would use the original

Code: Select all

sudo cp ~/Downloads/plymouth.txt /usr/share/initramfs-tools/hooks/plymouth
and it you save it to your Desktop folder, use

Code: Select all

sudo cp ~/Desktop/plymouth.txt /usr/share/initramfs-tools/hooks/plymouth
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Ok, here's what I get for the entire process:

Code: Select all

**@*******:~$ sudo mv /usr/share/initramfs-tools/hooks/plymouth{,.orig}
[sudo] password for **:          
**@*******:~$ sudo chmod -x /usr/share/initramfs-tools/hooks/plymouth.orig
**@*******:~$ sudo cp ~/Desktop/plymouth.txt /usr/share/initramfs-tools/hooks/plymouth
**@*******:~$ sudo chmod +x /usr/share/initramfs-tools/hooks/plymouth
**@*******:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
1
2
3
4
5
6
7
8
9
10 (mint-logo)
11 (mint-logo)
10 (mint-text)
11 (mint-text)
10 (mint-logo)
11 (mint-logo)
12
13
14
15
16
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
**@*******:~$ sudo mv /usr/share/initramfs-tools/hooks/plymouth{.orig,}
**@*******:~$ sudo chmod +x /usr/share/initramfs-tools/hooks/plymouth
**@*******:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

Okay; what does

Code: Select all

ls -l /usr/share/fonts/truetype/ubuntu/Ubuntu*-R.ttf
say for you? and does fc-cache -s complete successfully?
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Uh-oh. I think I did something really dumb. I've been cleaning out fonts that I don't use, and, well, I'm pretty sure the Ubuntu font was one of them. Does something like this really affect the kernel?
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Code: Select all

ls -l /usr/share/fonts/truetype/ubuntu/Ubuntu*-R.ttf
gives

Code: Select all

ls: cannot access '/usr/share/fonts/truetype/ubuntu/Ubuntu*-R.ttf': No such file or directory
and

Code: Select all

fc-cache -s
gives . . . nothing
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

Mmm. Seems it actually should've showed at least Ubuntu-R.ttf itself since we're in a if [ -e ... ] branch, but...

If you do sudo apt-get install fonts-ubuntu does then a subsequent sudo update-initramfs -u no longer complain?
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
fonts-ubuntu is already the newest version (0.83-4ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 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
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.4.0-89-generic (5.4.0-89.100) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.4.0-89-generic (5.4.0-89.100) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-89-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-89-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.4.0-89-generic (--configure):
 installed linux-image-5.4.0-89-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-5.4.0-89-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
and

Code: Select all

update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
I did save the ubuntu fonts on my NAS just in case; I could put them back in the folder manually . . . ?
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

Ah, you even quite manually "uninstalled" those Ubuntu fonts I then take it. Nah, do

Code: Select all

sudo apt-get install --reinstall fonts-ubuntu
instead and retry the sudo update-initramfs -u.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 1,458 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ubuntu.mirror.constant.com focal/main amd64 fonts-ubuntu all 0.83-4ubuntu1 [1,458 kB]
Fetched 1,458 kB in 0s (4,145 kB/s)    
(Reading database ... 368818 files and directories currently installed.)
Preparing to unpack .../fonts-ubuntu_0.83-4ubuntu1_all.deb ...
Unpacking fonts-ubuntu (0.83-4ubuntu1) over (0.83-4ubuntu1) ...
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Setting up fonts-ubuntu (0.83-4ubuntu1) ...
Setting up linux-image-5.4.0-89-generic (5.4.0-89.100) ...
Processing triggers for fontconfig (2.13.1-2ubuntu3) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgmint-swap_1)
I: Set the RESUME variable to override this.
Processing triggers for linux-image-5.4.0-89-generic (5.4.0-89.100) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-89-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgmint-swap_1)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-89-generic
Found initrd image: /boot/initrd.img-5.4.0-89-generic
Found linux image: /boot/vmlinuz-5.4.0-86-generic
Found initrd image: /boot/initrd.img-5.4.0-86-generic
Found linux image: /boot/vmlinuz-5.4.0-74-generic
Found initrd image: /boot/initrd.img-5.4.0-74-generic
Adding boot menu entry for UEFI Firmware Settings
done
and

Code: Select all

update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgmint-swap_1)
I: Set the RESUME variable to override this.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

Yes, that I is normal Information from update-initramfs. You're sorted now. Suppose you'll want/need to run sudo apt-get install -f now to finish up but otherwise things should be good.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Excellent! However, I'm still not getting any new updates of any kind in the update manager. I'm still on kernel 74 though, should I boot from the latest one I have which is 89 and then try updating?
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

And I suppose you manually clicked "refresh" in said Update Manager by now. If so quite unsure what that is about all of a sudden. But sure, if you when on the -89 kernel (snaphot?) do get them, go ahead I'd say.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Ok, successfully booted from 89 (which I think I maybe wasn't able to do before? I can't remember at this point. Anyway . . . ) However, still no new updates in the manager after hitting refresh. Time for Timeshift?
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

Probably not. Does sudo apt-get update elucidate?
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Unfortunately not: typing sudo apt-get update in the cli and then refreshing update manager doesn't give me any updates.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

No, it wouldn't, but the point was seeing if the console-level update would complain. However, I'm not on 5.4 but just checked, and 5.4.0-89 is still the latest indeed also for me so aren't you just saying that you're fully updated?
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Well, I'm pretty sure there was a "100" that came up earlier, but now it does not.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
sleeper12
Level 21
Level 21
Posts: 14559
Joined: Thu May 25, 2017 3:22 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by sleeper12 »

Just to confirm, I have 5.4.0-89 as well.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

And is this all because I removed the ubuntu fonts?!
Ok, well done and done then would you say?
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

You probably noticed a 5.4.0-89.100 earlier: that 100 in there is an additional level of versioning denoting an upload number but is not important.

I do not know why you didn't get a kernel update offered on -74 but as far as I can otherwise see at least the issue that concerned this specific thread has been dealt with.

And, yes, and "removed" in a two-times sort of way: had you removed it via the package manager things would've complained before and showed a slew of dependencies but since you went in manually, the package manager still thought all was hunky dory. It seems Plymouth, the graphical splash screen, uses those Ubuntu fonts for something. As said, I don't even use that splash screen so no idea what for, but yah, don't generally be too keen on removing things and certainly not manually.

Note that your harddrive doesn't care anyway if some unused bit of space is filled with zeroes or with an Ubuntu font; that "bloat" is more often than not a human concept alone --- and as we all know, humans are to be ignored at all times.
Locked

Return to “Beginner Questions”