1

error :

  E: Sub-process /usr/bin/dpkg returned an error code (1)

I am using ubuntu 16.10. I am trying to install virtual box but it is not getting installed. it shows

 sudo apt-get install virtualbox
 Reading package lists... Done
 Building dependency tree       
Reading state information... Done
virtualbox is already the newest version (5.1.6-dfsg-2).
The following packages were automatically installed and are no longer     required:
  libudev1:i386 linux-image-4.4.0-53-generic
 linux-image-extra-4.4.0-53-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 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 virtualbox-ext-pack (5.1.6-2) ...
virtualbox-ext-pack: downloading:        http://download.virtualbox.org/virtualbox/5.1.6/Oracle_VM_VirtualBox_Exten    sion_Pack-5.1.6.vbox-extpack
The file will be downloaded into /usr/share/virtualbox-ext-pack
Hash mismatch Oracle_VM_VirtualBox_Extension_Pack-5.1.6.vbox-extpack
dpkg: error processing package virtualbox-ext-pack (--configure):
 subprocess installed post-installation script returned error exit      status 1
Errors were encountered while processing:
 virtualbox-ext-pack
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried

sudo sudo dpkg --configure -a  
sudo rm /etc/apt/sources.list
sudo software-properties-gtk

but its not working

  • 2
    The problem you have belongs to the Hash mismatch Oracle_VM_VirtualBox_Extension_Pack-5.1.6.vbox-extpack. Please see this and what I mentioned under point 3. It belongs to the key you have to register via wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -,, which is all described here. – Hölderlin Dec 21 '16 at 10:24
1

Try running below commands:

sudo apt-get purge virtualbox
sudo apt-get update
sudo apt-get install virtualbox

Hope it will resolve your issue.

  • Yes, it worked. May you explain the above commands? – Yogesh Gaikwad Dec 21 '16 at 10:49
  • Sure, apt-get purge virtualbox* -- > this command will purge all virtualbox package and left over file of virtualbox. sudo apt-get update --> it will downloads the package lists from the repositories and updates them to get information on the newest versions of packages and their dependencies to be install – Rakesh C Dec 21 '16 at 10:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.