5

Virtual Box had been already installed by:

sudo apt install virtualbox

Then I went on installing the extension pack:

sudo apt install virtualbox-ext-pack

This runs into the error:

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)

I already tried to reboot and re-install using 'apt purge ...'. Nevertheless the problem is still remains.

How to install Virtual Box's Extension Pack via default repository in Ubuntu 17.10?

I just noticed that the directory /usr/share/virtualbox-ext-pack is empty. On a reference system the folder contains the *.vbox-extpack file. Maybe this is a proxy problem here?

eDeviser
  • 1,989
  • 7
  • 20
  • 37
  • What is the output of this command : `curl -Is http://download.virtualbox.org/virtualbox/5.1.34/Oracle_VM_VirtualBox_Extension_Pack-5.1.34.vbox-extpack | head -n 1` ? – Ali Razmdideh Mar 29 '18 at 09:03
  • @AliRazmdideh: There is no output. Running without the `-s` option says: 'curl: (6) Could not resolve host: download.virtualbox.org'. I do not understand this. The proxy is already inserted in `/etc/apt/apt.conf`. Other installations work pretty fine. – eDeviser Mar 29 '18 at 09:10
  • 1
    This is not enough to set proxy just for apt please set a proxy on terminal with this method https://askubuntu.com/a/584183/550618 and then test again. – Ali Razmdideh Mar 29 '18 at 09:13
  • 1
    The `virtualbox-ext-pack` is downloaded from http://download.virtualbox.org with `wget` tools. So you this is not enough to use proxy just for apt. – Ali Razmdideh Mar 29 '18 at 09:20
  • I'm glad I could help you. I make these comments, an answer. – Ali Razmdideh Mar 29 '18 at 09:39
  • Yes. I like your answer. Additional I added now the proxy to /etc/environment by using something like `sudo gedit /etc/environment` – eDeviser Mar 29 '18 at 12:09

1 Answers1

7

When you run this command :

sudo apt install virtualbox-ext-pack

During installation , the virtualbox-ext-pack is downloaded from http://download.virtualbox.org/ with wget tools.

But as you said, you use proxy for apt and also you can't access the http://download.virtualbox.org/ site, without proxy (because of curl: (6) Could not resolve host: download.virtualbox.org output, in your comments).

So you should set a proxy on your terminal (not just for apt) with this commands:

export http_proxy='http://proxyserveraddress:port'    
export https_proxy='https://proxyserveraddress:port'

After set proxy in terminal, your problem should be solved.

Ali Razmdideh
  • 5,710
  • 2
  • 34
  • 51