1

This question already has an answer here:

i'm running into an error after setting up virtualbox via apt-get

~# sudo systemctl status vboxdrv
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mi 2017-01-18 14:23:55 UTC; 1min 17s ago
Process: 22299 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=1/FAILURE)

Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]: vboxdrv.sh: Starting VirtualBox services.
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]: vboxdrv.sh: Building VirtualBox kernel modules.
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]: dpkg-query: Kein Pfad gefunden, der auf Muster /lib/modules/4.4.0-042stab113.11/kernel passt
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]: This system is not currently set up to build kernel modules (system extensions).
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]: Running the following commands should set the system up correctly:
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]:   apt-get install -headers-4.4.0-042stab113.11
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]: (The last command may fail if your system is not fully updated.)
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]:   apt-get install -headers
Jan 18 14:23:55 HOSTNAME vboxdrv.sh[22299]: vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.`

it tells me to execute

~# apt-get install -headers-4.4.0-042stab113.11
E: Command line option 'e' [from -headers-4.4.0-042stab113.11] is not understood in combination with the other options.

~# apt-get install -headers
E: Command line option 'e' [from -headers] is not understood in combination with the other options.

The Logfile:

~# cat /var/log/vbox-install.log
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
[for each time i've tried]

There is no folder called 'kernel' in /lib/modules/4.4.0-042stab113.11/ as i'd actually expect it to be.

So, how may i to resolve this error?

This system is not currently set up to build kernel modules (system extensions)

Any ideas?


This is what i did so far:

now, this is my output.

~# sudo apt-get install linux-headers-4.4.0-042stab113.11

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
E: Paket linux-headers-4.4.0-042stab113.11 kann nicht gefunden werden.
E: Mittels des Musters »linux-headers-4.4.0-042stab113.11« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-headers-4.4.0-042stab113.11« konnte kein Paket gefunden werden.

package linux-headers-4.4.0-042stab113.1 couldn't be found

~# sudo apt-get install linux-headers

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Paket linux-headers ist ein virtuelles Paket, das bereitgestellt wird von:
  linux-headers-4.4.0-1001-aws 4.4.0-1001.10
  linux-headers-4.8.0-34-lowlatency 4.8.0-34.36~16.04.1
  linux-headers-4.8.0-34-generic 4.8.0-34.36~16.04.1
  linux-headers-4.8.0-32-lowlatency 4.8.0-32.34~16.04.1
  linux-headers-4.8.0-32-generic 4.8.0-32.34~16.04.1
  linux-headers-4.8.0-30-lowlatency 4.8.0-30.32~16.04.1
  linux-headers-4.8.0-30-generic 4.8.0-30.32~16.04.1
  linux-headers-4.8.0-28-lowlatency 4.8.0-28.30~16.04.1
  linux-headers-4.8.0-28-generic 4.8.0-28.30~16.04.1
  linux-headers-4.4.0-59-lowlatency 4.4.0-59.80
  linux-headers-4.4.0-59-generic 4.4.0-59.80
  linux-headers-4.4.0-57-lowlatency 4.4.0-57.78
  linux-headers-4.4.0-57-generic 4.4.0-57.78
  linux-headers-4.4.0-53-lowlatency 4.4.0-53.74
  linux-headers-4.4.0-53-generic 4.4.0-53.74
  linux-headers-4.4.0-51-lowlatency 4.4.0-51.72
  linux-headers-4.4.0-51-generic 4.4.0-51.72
  linux-headers-4.4.0-47-lowlatency 4.4.0-47.68
  linux-headers-4.4.0-47-generic 4.4.0-47.68
  linux-headers-4.4.0-45-lowlatency 4.4.0-45.66
  linux-headers-4.4.0-45-generic 4.4.0-45.66
  linux-headers-4.4.0-43-lowlatency 4.4.0-43.63
  linux-headers-4.4.0-43-generic 4.4.0-43.63
  linux-headers-4.4.0-42-lowlatency 4.4.0-42.62
  linux-headers-4.4.0-42-generic 4.4.0-42.62
  linux-headers-4.4.0-38-lowlatency 4.4.0-38.57
  linux-headers-4.4.0-38-generic 4.4.0-38.57
  linux-headers-4.4.0-36-lowlatency 4.4.0-36.55
  linux-headers-4.4.0-36-generic 4.4.0-36.55
  linux-headers-4.4.0-34-lowlatency 4.4.0-34.53
  linux-headers-4.4.0-34-generic 4.4.0-34.53
  linux-headers-4.4.0-31-lowlatency 4.4.0-31.50
  linux-headers-4.4.0-31-generic 4.4.0-31.50
  linux-headers-4.4.0-28-lowlatency 4.4.0-28.47
  linux-headers-4.4.0-28-generic 4.4.0-28.47
  linux-headers-4.4.0-24-lowlatency 4.4.0-24.43
  linux-headers-4.4.0-24-generic 4.4.0-24.43
  linux-headers-4.4.0-22-lowlatency 4.4.0-22.40
  linux-headers-4.4.0-22-generic 4.4.0-22.40
  linux-headers-4.4.0-21-lowlatency 4.4.0-21.37
  linux-headers-4.4.0-21-generic 4.4.0-21.37
Sie sollten eines explizit zum Installieren auswählen.

E: Für Paket »linux-headers« existiert kein Installationskandidat.

It's a virtual package provided by .. choose one explicite to install.

~# apt-get install linux-headers-4.4.0-42-generic
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
linux-headers-4.4.0-42-generic is already the newest version (4.4.0-42.62).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

Already up to date.

~# sudo apt-get upgrade

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

noting to do here

~# sudo apt-get install linux-headers-$(uname -r)
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
E: Paket linux-headers-4.4.0-042stab113.11 kann nicht gefunden werden.
E: Mittels des Musters »linux-headers-4.4.0-042stab113.11« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-headers-4.4.0-042stab113.11« konnte kein Paket gefunden werden.

Package linux-headers-4.4.0-042stab113.11 could not be found.

marked as duplicate by David Foerster, Pilot6, Eric Carvalho, Kevin Bowen, TheWanderer Jan 20 '17 at 0:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Are really running Ubuntu? 4.4.0-042stab113.11 seems to be a custom kernel which we don't support here. Please switch to an official kernel. – David Foerster Jan 19 '17 at 10:53
3

From the virtualbox website

With Debian and Ubuntu-based distributions, you must install the right version of the linux-headers, usually whichever of linux-headers-generic , linux-headers-amd64 , linux-headers-i686 or linux-headers-i686-pae best matches the kernel version name; and if it exists the linux-kbuild package. Basic Ubuntu releases should have the right packages installed by default.

You can find which of these you have installed by doing an apt-cache policy linux-generic* and looking for the one that has the *** in the output. For me it was linux-generic-lts-xenial, so the header package I would need to install is linux-headers-generic-lts-xenial

You may also need to install the build-essential package.

-1

In your case

$ sudo apt-get install linux-headers-4.4.0-042stab113.11
$ sudo apt-get install linux-headers

If the last command fails you might need to execute

$ sudo apt-get update
$ sudo apt-get upgrade

In general

Install the headers with

$ sudo apt-get install linux-headers-$(uname -r)
  • linux-headers doesn't exist. Do you mean linux-headers-generic by any chance? linux-headers-4.4.0-042stab113.11 doesn't exist either because it appears to be a custom kernel package. – David Foerster Jan 19 '17 at 10:54

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