error processing packge memtest86+

Asked by Sherry

Hello,

I got the following error message when I run "sudo apt upgrade":

/usr/share/debconf/confmodule: line 44: 3: Bad file descriptor
dpkg: error processing package memtest86+ (--configure):
 installed memtest86+ package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...
Errors were encountered while processing:
 memtest86+
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there any way to fix this issue? Thank you very much!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu memtest86+ Edit question
Assignee:
No assignee Edit question
Solved by:
Sherry
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes please provide the output that you receive for the following commands (to be executed in a terminal window):

uname -a
lsb_release -crid
apt policy debconf memtest86+

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

Revision history for this message
Sherry (sherryj) said :
#3

Sorry, that I forgot to reply this message.

Here is the information you requested:
1) uname -a
Linux xxx-falcon 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
2) lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

3) apt policy debconf memtest86+
debconf:
  Installed: 1.5.73
  Candidate: 1.5.73
  Version table:
 *** 1.5.73 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages
        100 /var/lib/dpkg/status
memtest86+:
  Installed: (none)
  Candidate: 5.01-3.1ubuntu2.1
  Version table:
     5.31b+dfsg-4~bpo20.04.1 100
        100 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages
     5.01-3.1ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
     5.01-3.1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

I tried different ways to resolve this issues, including remove memtest86+ and re-install it, hwowever, I kept getting the error message
"/usr/share/debconf/confmodule: line 44: 3: Bad file descriptor
dpkg: error processing package memtest86+ (--configure):
 installed memtest86+ package post-installation script subprocess returned error
 exit status 1
Errors were encountered while processing:
 memtest86+
E: Sub-process /usr/bin/dpkg returned an error code (1)"

And I also tried to comment out "set e" in the file of .postinst and .postrm files for grub-pc and memtest86+ at /var/lib/dpkg/info based on the sollution provided here "https://forums.debian.net/viewtopic.php?t=123279" and run "sudo sh -x /var/lib/dpkg/info/memtest86+.postinst configure". Then I get the following message: "/usr/share/debconf/confmodule: line 44: 3: Bad file descriptor".

Could you advise what should I do next to resolve this issue? Thank you!

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Let's check whether a downgrade to the previous version is possible.

What output do you receive for the command

sudo apt install memtest86+=5.01-3.1ubuntu2.1 -f

Revision history for this message
Sherry (sherryj) said :
#5

Thank you! But I got the same error message as shown below:
"Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-5.4.0-169-generic
Found kernel: /boot/vmlinuz-4.4.0-137-generic.efi.signed
Found kernel: /boot/vmlinuz-4.4.0-137-generic
Found kernel: /boot/memtest86+.bin
/usr/share/debconf/confmodule: line 44: 3: Bad file descriptor
dpkg: error processing package memtest86+ (--configure):
 installed memtest86+ package post-installation script subprocess returned error
 exit status 1
Errors were encountered while processing:
 memtest86+
E: Sub-process /usr/bin/dpkg returned an error code (1)
"

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Ok. I take this as an indication that he culprit is not the memtest86+ package, but something else.

What output do you receive for the command

sudo apt install --reinstall debconf -f

Revision history for this message
Sherry (sherryj) said :
#7

Similar error message as shown below:
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-5.4.0-169-generic
Found kernel: /boot/vmlinuz-4.4.0-137-generic.efi.signed
Found kernel: /boot/vmlinuz-4.4.0-137-generic
Found kernel: /boot/memtest86+.bin
/usr/share/debconf/confmodule: line 44: 3: Bad file descriptor
dpkg: error processing package memtest86+ (--configure):
 installed memtest86+ package post-installation script subprocess returned error
 exit status 1
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 memtest86+
E: Sub-process /usr/bin/dpkg returned an error code (1)

Thank you!

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

Strange.

Do you get any output for the command

set | grep DEB

Revision history for this message
Sherry (sherryj) said :
#9

Here is the output:

GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS='JS ERROR;JS LOG'

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

No, that also does not provide a hint to the cause.

What output do you receive for the command

sudo bash -x /var/lib/dpkg/info/memtest86+.postinst configure

(For reference, that is the output on my test system:)
+ set -e
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/memtest86+.postinst configure
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-174-generic
Found initrd image: /boot/initrd.img-5.4.0-174-generic
...

Revision history for this message
Sherry (sherryj) said :
#11

Kept getting the similar error message:

+ set -e
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/memtest86+.postinst configure
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-5.15.0-101-generic
Found kernel: /boot/vmlinuz-5.4.0-174-generic
Found kernel: /boot/vmlinuz-5.4.0-169-generic
Found kernel: /boot/vmlinuz-4.4.0-137-generic.efi.signed
Found kernel: /boot/vmlinuz-4.4.0-137-generic
Found kernel: /boot/memtest86+.bin
/usr/share/debconf/confmodule: line 44: 3: Bad file descriptor

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

Your output looks very much different from mine.

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...

vs.

Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...

Do you have grub-customizer installed?

Revision history for this message
Sherry (sherryj) said :
#13

I didn't install grub-customizer, so I installed it now. During the "grub-customizer" installation, I still get the error info related to memtest86+.

After installing the grub-customizer, I re-run "sudo bash -x /var/lib/dpkg/info/memtest86+.postinst configure" and still get the same output as I showed before:
+ set -e
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/memtest86+.postinst configure
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-5.15.0-101-generic
Found kernel: /boot/vmlinuz-5.4.0-174-generic
Found kernel: /boot/vmlinuz-5.4.0-169-generic
Found kernel: /boot/vmlinuz-4.4.0-137-generic.efi.signed
Found kernel: /boot/vmlinuz-4.4.0-137-generic
Found kernel: /boot/memtest86+.bin
/usr/share/debconf/confmodule: line 44: 3: Bad file descriptor

It seems that I cannot get over this issue...

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#14

I am sorry, but this was a misunderstanding. I did not want that you install grub-customizer, even somewhat on the contrary. There are several reports that grub-customizer may cause all kinds of weird errors, so my question was, whether that may also be the case here.

Next idea: maybe you do not have the correct version of some packages.
What output do you receive for the commands

sudo dpkg --audit
sudo apt update
apt policy grub-pc

Revision history for this message
Sherry (sherryj) said :
#15

Wow! Thank you so much for your assistance! The issue has finally been resolved!

The problem stemmed from the absence of 'grub-pc' on Ubuntu. When I ran 'apt policy grub-pc', it indicated that 'none' was installed. After installing 'grub-pc', the issue was resolved!

Once again, I sincerely appreciate your help. Thank you!!