Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Installing virtualbox in Debian 9, kernel issue, packages

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
super.panda
Posts: 6
Joined: 2018-02-18 13:11

Installing virtualbox in Debian 9, kernel issue, packages

#1 Post by super.panda »

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

#2 Post by super.panda »

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

#3 Post by super.panda »

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

dcihon
Posts: 279
Joined: 2012-09-23 16:18
Been thanked: 3 times

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

#4 Post by dcihon »

I would say we need to see your sources.list.
If you have inxi installed do this:
inxi -r

User avatar
super.panda
Posts: 6
Joined: 2018-02-18 13:11

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

#5 Post by super.panda »

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

#6 Post by super.panda »

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
pawRoot
Posts: 603
Joined: 2016-12-28 18:26
Has thanked: 1 time
Been thanked: 1 time

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

#7 Post by pawRoot »

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
super.panda
Posts: 6
Joined: 2018-02-18 13:11

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

#8 Post by super.panda »

Thank's bro :twisted:

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#9 Post by stevepusser »

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.
MX Linux packager and developer

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

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

#10 Post by sunrat »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#11 Post by Head_on_a_Stick »

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:
deadbang

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

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

#12 Post by sunrat »

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
Thorny
Posts: 542
Joined: 2011-02-27 13:40

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

#13 Post by Thorny »

[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
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

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

#14 Post by sunrat »

Yes we are all correct here. I have great respect for Head_on_a_Stick and didn't take his post as even slightly denigrating.

There are some strange issues here:
- Why is linux-headers-4.9.0-5-amd64 not located when it exists currently in Stretch main repo?
- Why does kernel 4.14 appear at all?

@super.panda did you run apt update before attempting to install headers?
Wizard's above suggestion to install the metapackage is a good one too.

Posting the output of apt-cache policy (or inxi -r) will help a lot.
“ 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
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#15 Post by stevepusser »

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:
Since it's Stretch:

Code: Select all

apt policy
:mrgreen: :mrgreen: :mrgreen:
MX Linux packager and developer

Post Reply