0

I have installed Ubuntu 20.04 LTS in my Oracle VM.

I am trying to install python in it.

When I tried entering sudo apt install python2 command, the system throws me an error:

vinod@vinod-VirtualBox:~$ sudo apt install python2
[sudo] password for vinod:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python2 is already the newest version (2.7.17-2ubuntu4).
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
1 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 linux-image-5.4.0-42-generic (5.4.0-42.46) ...
Processing triggers for linux-image-5.4.0-42-generic (5.4.0-42.46) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-42-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-42-generic
/etc/kernel/postinst.d/vboxadd:
run-parts: failed to exec /etc/kernel/postinst.d/vboxadd: Exec format error
run-parts: /etc/kernel/postinst.d/vboxadd exited with return code 1
dpkg: error processing package linux-image-5.4.0-42-generic (--configure):
 installed linux-image-5.4.0-42-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.4.0-42-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
vinod@vinod-VirtualBox:~$

Is there any possibility the Ubuntu installation is crashed in my VM?

  • 1
    Are you running Ubuntu as a VM under Virtualbox? If so, it looks like your VBox extensions may have gotten corrupted (those the error about vboxadd). Try reinstalling your extensions... did you install them from the ISO? – Brian Turek Sep 6 at 12:51
  • @BrianTurek Yes. I have installed it using the ISO image which is downloaded from Ubuntu website. Could you please tell me how do I install the extensions. – vkk05 Sep 6 at 13:33
  • 2
    You seem to be misreading the apt output. You DID successfully install python2 (python2 is already the newest version (2.7.17-2ubuntu4)). – user535733 Sep 6 at 14:33
  • 4
    The vboxadd exec error looks very similar to Ubuntu 16.04 broken kernel packages won't let me install or remove anything with apt-get – user535733 Sep 6 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.