In my attempt to run VirtualBox in Debian 8 I got:
alex@server-2:~$ virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.32-042stab126.1) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
Qt FATAL: QXcbConnection: Could not connect to display
Aborted
In my attempt to follow this suggestion I got:
alex@server-2:~$ sudo /sbin/vboxconfig
[sudo] password for alex:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
My kernel version:
alex@server-2:~$ uname -r
2.6.32-042stab126.1
My linux-headers:
alex@server-2:~$ dpkg --get-selections | grep linux-headers
linux-headers-3.16.0-4-amd64 install
linux-headers-3.16.0-4-common install
linux-headers-amd64 install
In my attempt to get right linux-header I got:
alex@server-2:~$ sudo apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-2.6.32-042stab126.1
E: Couldn't find any package by regex 'linux-headers-2.6.32-042stab126.1'
Then I tried to upgrade my linux kernel in order to be consistent with linux-headers
alex@server-2:~$ sudo apt-cache search linux-image
linux-headers-3.16.0-4-amd64 - Header files for Linux 3.16.0-4-amd64
linux-image-3.16.0-4-amd64 - Linux 3.16 for 64-bit PCs
linux-image-3.16.0-4-amd64-dbg - Debugging symbols for Linux 3.16.0-4-amd64
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package)
nvidia-kernel-3.16.0-4-amd64 - NVIDIA binary kernel module for Linux 3.16.0-4-amd64
alex@server-2:~$ sudo apt-get install linux-image-3.16.0-4-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-3.16.0-4-amd64 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
That seems that I have newest version. Now I have no clue what to do next in order to fix my problem with running VirtualBox. Do you have any suggestion?