安装虚拟盒时出错

安装虚拟盒时出错

错误 :

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

我正在使用 ubuntu 16.10。我正在尝试安装虚拟盒,但无法安装。它显示

 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)

我也试过

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

但它不起作用

答案1

尝试运行以下命令:

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

希望它能解决您的问题。

相关内容