Installing virtualbox in Debian 9, kernel issue, packages

Kernels & Hardware, configuring network, installing services

Installing virtualbox in Debian 9, kernel issue, packages

Postby super.panda » 2018-02-18 13:21

Hello folks,

New to Debian. Should probably serach forum but maybe there is anyone who could help out. I have enabled virtual setting is BIOS. Then I have installed VBox. When creating, as example, Kali machine I am getting:

----------------------------------------------------------------------------------------------------------------------------------
Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/sbin/vboxconfig'

as root.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
----------------------------------------------------------------------------------------------------------------------------------

Then running '/sbin/vboxconfig' gave me this:

-------------------------------------------------------------------------------------------------------------------
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: Stopping VirtualBox services.
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.9.0-5-amd64
(The last command may fail if your system is not fully updated.)
apt-get install linux-headers-amd64
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.9.0-5-amd64
(The last command may fail if your system is not fully updated.)
apt-get install linux-headers-amd64

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

Then I tried to install headers and got this:

-------------------------------------------------------------------------------------------------------------------
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.9.0-5-amd64
E: Couldn't find any package by glob 'linux-headers-4.9.0-5-amd64'
E: Couldn't find any package by regex 'linux-headers-4.9.0-5-amd64'
-------------------------------------------------------------------------------------------------------------------

I tried many things from YouTube and searched whole DuckDuck, but no luck. Is this regarding repos or? I am at the big red wall and I am not getting forward with this. Please, help or give me some link u have maybe?

Thank you so much in advance.
User avatar
super.panda
 
Posts: 6
Joined: 2018-02-18 13:11

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby wizard10000 » 2018-02-18 14:11

Virtualbox will not build without kernel headers. Rather than install headers for a specific kernel just install the linux-headers-amd64 package. You'll need new headers with each kernel upgrade and this is the easiest way to keep them current.

So - as root:
Code: Select all
apt purge virtualbox*
apt install linux-headers-amd64

then install virtualbox.

Good luck -
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1299
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby super.panda » 2018-02-18 14:39

Thanks. Tried. Getting nothing. Also when booting getting message that "Faile to start virtualbox linux kernel...see systemctl status virtualbox.service.."

Checking: "Unit virtualbox.service could not be found."
User avatar
super.panda
 
Posts: 6
Joined: 2018-02-18 13:11

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby super.panda » 2018-02-18 14:49

Also trying to update, but I am getting this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-4.14.0-3-amd64
E: Couldn't find any package by glob 'linux-image-4.14.0-3-amd64'
E: Couldn't find any package by regex 'linux-image-4.14.0-3-amd64
User avatar
super.panda
 
Posts: 6
Joined: 2018-02-18 13:11

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby dcihon » 2018-02-18 14:57

I would say we need to see your sources.list.
If you have inxi installed do this:
inxi -r
dcihon
 
Posts: 233
Joined: 2012-09-23 16:18

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby super.panda » 2018-02-18 15:05

Here we go:

#



deb http://deb.debian.org/debian/ stretch main
deb-src http://deb.debian.org/debian/ stretch main

deb http://deb.debian.org/debian/ stretch/updates main
deb-src http://deb.debian.org/debian/ stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ stretch-updates main
deb-src http://deb.debian.org/debian/ stretch-updates main
deb http://deb.debian.org/debian/ stretch non-free
# deb-src http://ftp.de.debian.org/debian stretch main non-free
# deb-src http://deb.debian.org/debian stretch main non-free
deb http://download.virtualbox.org/virtualbox/debian stretch contrib
# deb-src http://download.virtualbox.org/virtualbox/debian stretch contrib
deb http://deb.debian.org/debian stretch contrib main non-free
# deb-src http://deb.debian.org/debian stretch main
# deb-src http://deb.debian.org/debian stretch main contrib non-free

also...

inxi -r
bash: inxi: command not found
User avatar
super.panda
 
Posts: 6
Joined: 2018-02-18 13:11

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby wizard10000 » 2018-02-18 15:43

super.panda wrote:Also trying to update, but I am getting this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-4.14.0-3-amd64
E: Couldn't find any package by glob 'linux-image-4.14.0-3-amd64'
E: Couldn't find any package by regex 'linux-image-4.14.0-3-amd64


I saw your sources.list, which doesn't explain why apt is trying to install a 4.14 kernel in Stretch. Looks to me like the backports repo was enabled at one time but is no longer enabled. If you had backports mapped at one time, virtualbox is in there. No need to get it from a third party repo.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1299
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby super.panda » 2018-02-18 15:54

wizard10000 wrote:
super.panda wrote:Also trying to update, but I am getting this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-4.14.0-3-amd64
E: Couldn't find any package by glob 'linux-image-4.14.0-3-amd64'
E: Couldn't find any package by regex 'linux-image-4.14.0-3-amd64


I saw your sources.list, which doesn't explain why apt is trying to install a 4.14 kernel in Stretch. Looks to me like the backports repo was enabled at one time but is no longer enabled. If you had backports mapped at one time, virtualbox is in there. No need to get it from a third party repo.


Could you explain maybe in steps what could be best solution to get it to work!? Not so long time with Linux so there is things hard to understand to me. Thank you. :cry: :cry: :cry:
User avatar
super.panda
 
Posts: 6
Joined: 2018-02-18 13:11

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby pawRoot » 2018-02-18 15:59

super.panda wrote:
wizard10000 wrote:
super.panda wrote:Also trying to update, but I am getting this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-4.14.0-3-amd64
E: Couldn't find any package by glob 'linux-image-4.14.0-3-amd64'
E: Couldn't find any package by regex 'linux-image-4.14.0-3-amd64


I saw your sources.list, which doesn't explain why apt is trying to install a 4.14 kernel in Stretch. Looks to me like the backports repo was enabled at one time but is no longer enabled. If you had backports mapped at one time, virtualbox is in there. No need to get it from a third party repo.


Could you explain maybe in steps what could be best solution to get it to work!? Not so long time with Linux so there is things hard to understand to me. Thank you. :cry: :cry: :cry:


https://backports.debian.org/
https://wiki.debian.org/VirtualBox
User avatar
pawRoot
 
Posts: 572
Joined: 2016-12-28 18:26
Location: Poland

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby super.panda » 2018-02-18 16:03

Thank's bro :twisted:
User avatar
super.panda
 
Posts: 6
Joined: 2018-02-18 13:11

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby stevepusser » 2018-02-18 23:35

Just install module-assistant and run

Code: Select all
m-a prepare
as sysadmin to prepare your system to build modules!

Why the wiki and people here advise long arcane commands to install the headers and build-essential escapes me. :roll:

By the way, if you hope to use Kali in VBox for wi-fi penetration testing, prepare for disappointment.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10288
Joined: 2009-10-06 05:53

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby sunrat » 2018-02-19 00:38

You may also have other sources active which are not in sources.list. Which is why inxi is better, it will find them. Install inxi and show
Code: Select all
inxi -r

You also have stretch main duplicated.

+1what Stevo said about Kali - it's meant to be run live, usually from a USB flash key.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2495
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby Head_on_a_Stick » 2018-02-19 07:11

sunrat wrote:inxi is better

Why people here advise long arcane scripts to see APT's policies escapes me. :roll:
Code: Select all
apt-cache policy

:mrgreen:
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8324
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Installing virtualbox in Debian 9, kernel issue, package

Postby sunrat » 2018-02-19 09:27

Head_on_a_Stick wrote:
sunrat wrote:inxi is better

Why people here advise long arcane scripts to see APT's policies escapes me. :roll:
Code: Select all
apt-cache policy

:mrgreen:
Yeah that works too. I meant it's better than cat /etc/apt/sources.list as that won't show misc.list, oracle.list, blahblah.list whereas inxi will, and it will show tons of other useful info for helping solve problems when you need it.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2495
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

[OT]Re: Installing virtualbox in Debian 9, kernel issue, pac

Postby Thorny » 2018-02-19 10:41

[OT]
We always need to remember, that different people troubleshoot with different methods, often because of habits acquired over time. The proverbial "bottom line" is, was the OP's question solved to their satisfaction or at least sufficiently solved even if it wasn't in the absolutely shortest and most efficient manner. This is not a contest or at least it shouldn't be. I think we should cooperate and collaborate, not denigrate.

Just some thoughts from an old guy.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Next

Return to System configuration

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable