Virtualbox „Das System ist derzeit nicht zum Erstellen von Kernelmodulen eingerichtet“

Virtualbox „Das System ist derzeit nicht zum Erstellen von Kernelmodulen eingerichtet“

Ich versuche, Virtualbox auf meinem Ubuntu 16.04 zu installieren. Wenn ich versuche, es zu öffnen, erhalte ich eine Fehlermeldung, die mich auffordert, es auszuführen sudo /sbin/vboxconfig. Das Ausführen dieses Befehls führt zu folgender Ausgabe:

vboxdrv.sh: Building VirtualBox kernel modules.
     This system is not currently set up to build kernel modules (system                  extensions).
     Running the following commands should set the system up correctly:

  apt-get install linux-headers-4.2.0-35-generic
(The last command may fail if your system is not fully updated.)
  apt-get install linux-headers-generic
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:

  apt-get install linux-headers-4.2.0-35-generic
(The last command may fail if your system is not fully updated.)
  apt-get install linux-headers-generic

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

Die vorgeschlagenen Schritte funktionieren auf meinem Rechner nicht. Es heißt, dass das Paket veraltet ist. Die einzigen verfügbaren Header-Pakete sind 4.4.0-Pakete. Wenn ich uname -r ausführe, erhalte ich jedoch Version 4.2.0.

Irgendwelche Ideen, wie man das beheben kann?

Ausgabe von cat /etc/lsb-release:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

Ausgabe von sudo apt install linux-generic:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-generic is already the newest version (4.4.0.36.38).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Ausgabe von cat /etc/default/grub:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="                                                               Windows 10"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

export GRUB_COLOR_NORMAL="green/black"
export GRUB_COLOR_HIGHLIGHT="light-green/black"
export GRUB_MENU_PICTURE="/home/user/grub/maxresdefault.jpg"
GRUB_SAVEDEFAULT="false"

Antwort1

Sie haben eine beschädigte /etc/default/grubDatei.

Befestigen Sie die Leitung

GRUB_DEFAULT="                                                               Windows 10"

Zu

GRUB_DEFAULT=0

Dann entfernen

GRUB_SAVEDEFAULT="false"

und Renn

sudo update-grub

Dann neu starten.

verwandte Informationen