Attempt to install virtualbox on ubuntu 17.04

by Eder Cristian   Last Updated September 21, 2018 22:01 PM

I'm trying to install the virtualbox on a Ubuntu 17.04, but it is giving error when starting the program speaking that is speaking some libraries, since then I have tried how to proceed but everything I am trying to do is going wrong.

erro virtualbox

After this error, I tried to run

sbin / vboxconfig and it returned following to me:

Created symlink `/etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.`

Created `symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.`

Created `symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.`

Created `symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.`

`vboxdrv.sh`: Stopping VirtualBox services.

`vboxdrv.sh`: Starting VirtualBox services.

`vboxdrv.sh`: Building VirtualBox kernel modules.

This system is currently not set up to build kernel modules.

Please install the gcc make perl packages from your distribution.

This system is currently not set up to build kernel modules.

Please install the gcc make perl packages from your distribution.

There were problems setting up VirtualBox. To re-start the set-up process, run `/sbin/vboxconfig` as root.

Then I tried to execute the commands below to install gcc, but without any effect.'

sudo apt update

sudo apt upgrade

sudo apt-get install gcc

And it returned:

Reading package lists ... Ready
Building dependency tree
Reading status information ... Ready
Some packages could not be installed. This may mean that
you asked for an impossible situation or, if you are using the
unstable distribution, that some required packages were not
created yet or were taken from the "Incoming".

The following information may help resolve the situation:

The following packages have mismatched dependencies:


    gcc: Depends: gcc-7 (> = 7.2.0-1 ~) but will not be installed
           Recommended: libc6-dev but will not install or
                      libc-dev

E: Impossible to fix problems, you kept (hold) broken packages.

Someone could help me, I'm new to linux, I know few commands and I have no idea how to adjust / fix this problem.



Answers 3


You need to install more software than just plain gcc.

For sure you will need to do

apt install build-essential

It is also possible you will need to get this one

apt install linux-headers-$(uname -r)

Please install those and check if it passes. If it still fails I'll update instructions.

Anty
Anty
September 21, 2018 13:44 PM

Type in terminal:

sudo -i
apt-get autoremove
apt-get autoclean
/sbin/vboxconfig
Amirali
Amirali
September 21, 2018 13:46 PM

@anty

Thanks for responding, I ran the commands and pointed this out.

At first I ran:

sudo apt install build-essential

And It returned the following:

Reading package lists ... Ready
Building dependency tree
Reading status information ... Ready
Some packages could not be installed. This may mean that
you asked for an impossible situation or, if you are using the
that some required packages were not
created yet or were taken from the "Incoming".
The following information may help resolve the situation:

The following packages have mismatched dependencies:
  build-essential: Depends: libc6-dev but will not install or
                             libc-dev
                    Depends: gcc (> = 4: 7.2) but will not install
                    Depends: g ++ (> = 4: 7.2) but will not install
E: Impossible to fix problems, you kept (hold) broken packages.

So then I ran:

sudo apt install linux-headers - & (uname -r)

And this is what it returned to me:

[1] 25909
4.13.0-46-generic
Reading package lists ... Ready
Building dependency tree
Reading status information ... Ready
Virtual packages like 'linux-headers' can not be removed
0 packages upgraded, 0 new packages installed, 0 to be removed and 0 not upgraded.

@Amirali

I ran the command and the same one said that I did not have gcc installed.

Eder Cristian
Eder Cristian
September 21, 2018 14:08 PM

Related Questions