it-swarm.com.de

Virtual Box "System ist derzeit nicht zum Erstellen von Kernelmodulen eingerichtet" auf 16.04 (xenial)

Ich habe versucht, die virtuelle Box zu installieren, erhalte jedoch die folgende Fehlermeldung.

$ Sudo /sbin/vboxconfig 
[Sudo] password for dude: 
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.4.0-24-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.4.0-24-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.

Mein aktueller Kernel ist:

$ uname -r
4.4.0-24-generic

Beim Versuch, Header zu aktualisieren, erhalte ich Folgendes.

$ Sudo apt-get upgrade && Sudo apt-get install linux-headers-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-generic is already the newest version (4.4.0.21.22).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Es wurde versucht, linux-headers-4.4.0-24-generic direkt von deb zu installieren, aber es werden immer noch Fehler angezeigt. Von apt-get bekomme ich:

$ Sudo apt-get install linux-headers-4.4.0-24-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package linux-headers-4.4.0-24-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'linux-headers-4.4.0-24-generic' has no installation candidate

Sicherlich muss es einen Weg geben, dies zu beheben. Irgendwelche Vorschläge? Hilfe!

2
Andy Gyawali

Die Ausgabe von apt-cache policy linux-headers-4.4.0-24-generic, den Sie angegeben haben, war ein wichtiger Hinweis auf die Grundursache dieses Problems. Da der Befehl (teilweise) Candidate: none Es war klar, dass die Repos auf Ihrem System nicht richtig eingerichtet waren und daher nicht wussten, wo das gewünschte Paket zu finden war. Hinzufügen http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main zu Ihrer Quellenliste und Sie sollten in der Lage sein, das Paket zu installieren.

Damit Sie den Rest Ihrer Quellenliste überprüfen können, sehen Sie hier mein Beispiel (ich habe die auskommentierten Zeilen entfernt).

deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security multiverse
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main
0
Organic Marble