5

before I ask my question I take two weeks to solve it , but I can't.

So I come here to help me , because I have important files in host machines.

when I run virtualbox and trying to run windows machine I have this error:

Failed to open a session for the virtual machine Windows 8.1 (AboSami).

The virtual machine 'Windows 8.1 (AboSami)' has terminated unexpectedly during startup with exit code 1 (0x1).
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {f30138d4-e5ea-4b3a-8858-a059de4c93fd}

when I go to terminal and type virtualbox: this error

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.16.0-25-generic) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /etc/init.d/vboxdrv setup

         You will not be able to start VMs until this problem is fixed.

(VirtualBox:10912): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

(VirtualBox:10912): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

after that I run this command: sudo /etc/init.d/vboxdrv setup

Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 3.16.0-25-generic cannot be found at
/lib/modules/3.16.0-25-generic/build or /lib/modules/3.16.0-25-generic/source.
 ...failed!
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)

Then I go to /var/log/vbox-install.log

Uninstalling modules from DKMS
  removing old DKMS module vboxhost version  5.0.4

------------------------------
Deleting module version: 5.0.4
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/5.0.4/source ->
                 /usr/src/vboxhost-5.0.4

DKMS: add completed.
Failed to install using DKMS, attempting to install without
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

uname -r

Linux MajeedLinux 3.16.0-25-generic #33-Ubuntu SMP Fri Nov 7 01:53:40 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.1
DISTRIB_CODENAME=rebecca
DISTRIB_DESCRIPTION="Linux Mint 17.1 Rebecca"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
cat: /etc/upstream-release: Is a directory

Soruce.List

#deb cdrom:[Linux Mint 17.1 _Rebecca_ - Release amd64 20150107]/ utopic contrib main non-free
        deb http://packages.linuxmint.com qiana main upstream import #id:linuxmint_main
           deb http://extra.linuxmint.com qiana main #id:linuxmint_extra
           deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ trusty partner

Sorry , for my bad english , if any one can help me , plz.

========================================

apt-cache policy linux-headers-generic

linux-headers-generic:
  Installed: 3.13.0.63.71
  Candidate: 3.13.0.63.71
  Version table:
 *** 3.13.0.63.71 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.13.0.24.28 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

apt-cache show linux-headers-generic

Package: linux-headers-generic
Priority: optional
Section: devel
Installed-Size: 29
Maintainer: Ubuntu Kernel Team <[email protected]>
Architecture: amd64
Source: linux-meta
Version: 3.13.0.63.71
Depends: linux-headers-3.13.0-63-generic
Filename: pool/main/l/linux-meta/linux-headers-generic_3.13.0.63.71_amd64.deb
Size: 2380
MD5sum: 1d57e3d8b3dc262af709dfc98ba82cc1
SHA1: ea82b800783c945cd0dc37f66e21b6b5d4290c81
SHA256: 8712a621d35d3e05f7e1d814e4c7ad5d848d7fffa3bebe99f73f296f8852716f
Description-en: Generic Linux kernel headers
 This package will always depend on the latest generic kernel headers
 available.
Description-md5: 9c9742ab9c289b1e900fab477bc0070d
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: ubuntu-live, kubuntu-live, kubuntu-active-live, edubuntu-dvd-live, xubuntu-live, mythbuntu-live, lubuntu-live, ubuntu-gnome-live

Package: linux-headers-generic
Priority: optional
Section: devel
Installed-Size: 27
Maintainer: Ubuntu Kernel Team <[email protected]>
Architecture: amd64
Source: linux-meta
Version: 3.13.0.24.28
Depends: linux-headers-3.13.0-24-generic
Filename: pool/main/l/linux-meta/linux-headers-generic_3.13.0.24.28_amd64.deb
Size: 2314
MD5sum: 670c9305200ecd72c323a28abb64f8b2
SHA1: 3dbe6e886bae5484538947f0e6b76271d3185120
SHA256: 01f177e7a799bf4d80b69a1be9a33200527dae15e7fbbc4b9beaa6a070694a93
Description-en: Generic Linux kernel headers
 This package will always depend on the latest generic kernel headers
 available.
Description-md5: 9c9742ab9c289b1e900fab477bc0070d
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: ubuntu-live, kubuntu-live, kubuntu-active-live, edubuntu-dvd-live, xubuntu-live, mythbuntu-live, lubuntu-live, ubuntu-gnome-live
2
  • 1
    You need the kernel headers to compile the vbox module. Install them with sudo apt-get install linux-headers-generic and try again.
    – Nephente
    Sep 22, 2015 at 9:51
  • @nephente Please put this in an answer, as it is going to solve the problem.
    – Bruni
    Sep 22, 2015 at 10:51

2 Answers 2

9

I solved the problem , I reinstall virtualbox-dkms and reboot the pc

sudo apt-get --reinstall install virtualbox-dkms

thank you @nephente

2
  • The first line says 'reboot the pc' - that was essential in my case.
    – davejagoda
    Mar 18, 2018 at 0:23
  • @davejagoda In my case it even wasn't.
    – pt12lol
    Apr 9, 2018 at 14:06
1

The reason, why the module can not be built are, as the error suggest, missing kernel header files.

Install them with

sudo apt-get install linux-headers-generic

It will install a meta-package that always points to the latest kernel headers in the repository. If a new kernel is available and installed during a system update, the appropriate headers are going to be installed automatically as well.

Afterwards, try to install the vboxdrv modules again.

5
  • it doesn't work , I'm trying to install linux-headers-generic and then sudo /etc/init.d/vboxdrv setup
    – AboSami
    Sep 22, 2015 at 11:17
  • @AboSami "It doesn't work" is not helping very much... Is the error still the same? If not, append the new error to your original question. Did the headers install successfully? Also append the output of apt-cache policy linux-headers-generic and apt-cache show linux-headers-generic.
    – Nephente
    Sep 22, 2015 at 11:23
  • yes, you'r right. cannot install header-generic (E: Unable to locate package linux-header-generic ) , I edit the question above and add outputs
    – AboSami
    Sep 22, 2015 at 11:32
  • @AboSami It's linux-header_s_-generic with an 's'. But actually it is already installed. Just not for the kernel 3.16.0-25-generic you are running... Where does this come from? I guess from the Linux Mint repository that somehow made its way into sources.list.
    – Nephente
    Sep 22, 2015 at 11:34
  • yes I change the sources.list , do you think it is problem
    – AboSami
    Sep 22, 2015 at 11:41

Not the answer you're looking for? Browse other questions tagged .