You are not logged in.

#1 2016-09-14 01:55:39

drink_n_drive
Member
Registered: 2015-10-28
Posts: 28

[SOLVED] dpkg error, post-installation script error code 2

Hi all, long story short: A friend of mine installed BL on his HP laptop and, after his few first days as a cli user, he encountered this issue (I know, he's gotta register himself, but his English is not that fluent).

lucio@vertice:~$ sudo dpkg --configure linux-image-3.16.0-4-amd64
Configurando linux-image-3.16.0-4-amd64 (3.16.36-1+deb8u1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-4-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/sbin/grub-mkconfig: 34: /etc/default/grub: 440: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code
127
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-
image-3.16.0-4-amd64.postinst line 634, <STDIN> line 2.
dpkg: error al procesar el paquete linux-image-3.16.0-4-amd64 (--
configure):
el subproceso instalado el script post-installation devolvió el código
de salida de error 2
Se encontraron errores al procesar:
linux-image-3.16.0-4-amd64

He cannot install/upgrade any package.
This is our first query after a few searches. This guy, Lucio, has installed jgebowski's libpurple for facebook @ pidgin plugin from GIT, so that's the furthest we could track the issue (not quite technical information, but hey! it's drink_n_drive writing).
Any suggestions or extra output you need? Thanks in advance.

Last edited by drink_n_drive (2016-09-14 12:27:25)

Offline

#2 2016-09-14 03:44:17

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] dpkg error, post-installation script error code 2

It sounds like he has a messed up grub file.

Maybe try reinstalling grub, assuming it is installed to the first drive (sda), with

sudo grub-install /dev/sda && sudo update-grub

If that doesn't work then please post the output of

cat /etc/default/grub

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2016-09-14 06:24:49

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] dpkg error, post-installation script error code 2

This will make the command speak English:

sudo LC_ALL=C dpkg --configure linux-image-3.16.0-4-amd64

Looks like it's failing on the initramfs post-install script for the kernel due to a missing /etc/default/grub

To recreate this file, try:

sudo dpkg-reconfigure grub-pc

Or perhaps:

sudo aptitude reinstall grub-pc

Offline

#4 2016-09-14 12:13:06

drink_n_drive
Member
Registered: 2015-10-28
Posts: 28

Re: [SOLVED] dpkg error, post-installation script error code 2

Head_on_a_Stick wrote:
sudo aptitude reinstall grub-pc

That did the trick! Could you figure out what happened? How could there be a conflict with grub?

Thank you again.

Last edited by drink_n_drive (2016-09-14 12:13:24)

Offline

#5 2016-09-14 20:37:47

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] dpkg error, post-installation script error code 2

drink_n_drive wrote:

Could you figure out what happened?

User error, perhaps?

I often delete files accidentally, I'd be lost without backups big_smile

Offline

Board footer

Powered by FluxBB