Virtual Box 已由以下人员安装:
sudo apt install virtualbox
然后我继续安装扩展包:
sudo apt install virtualbox-ext-pack
这会遇到错误:
sudo apt install virtualbox-ext-pack
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
virtualbox-ext-pack
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/11,6 kB of archives.
After this operation, 127 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package virtualbox-ext-pack.
(Reading database ... 169888 files and directories currently installed.)
Preparing to unpack .../virtualbox-ext-pack_5.1.34-0ubuntu1.17.10.2_all.deb ...
License has already been accepted.
Unpacking virtualbox-ext-pack (5.1.34-0ubuntu1.17.10.2) ...
Setting up virtualbox-ext-pack (5.1.34-0ubuntu1.17.10.2) ...
virtualbox-ext-pack: downloading: http://download.virtualbox.org/virtualbox/5.1.34/Oracle_VM_VirtualBox_Extension_Pack-5.1.34.vbox-extpack
The file will be downloaded into /usr/share/virtualbox-ext-pack
dpkg: error processing package virtualbox-ext-pack (--configure):
subprocess installed post-installation script returned error exit status 4
Errors were encountered while processing:
virtualbox-ext-pack
E: Sub-process /usr/bin/dpkg returned an error code (1)
我已经尝试使用“apt purge ...”重新启动并重新安装。尽管如此,问题仍然存在。
如何在 Ubuntu 17.10 中通过默认存储库安装 Virtual Box 的扩展包?
我刚刚注意到目录/usr/share/virtualbox-ext-pack
是空的。在参考系统上,该文件夹包含该*.vbox-extpack
文件。也许这是这里的代理问题?
当您运行此命令时:
在安装过程中,使用工具
virtualbox-ext-pack
从http://download.virtualbox.org/下载。wget
但是正如您所说,您使用代理,
apt
并且您无法访问http://download.virtualbox.org/站点,没有代理(因为curl: (6) Could not resolve host: download.virtualbox.org
输出,在您的评论中)。因此,您应该使用以下命令在终端上设置代理(不仅仅是 apt):
在终端设置代理后,您的问题应该解决了。