Virtualbox error rc=-1904 (Solved)

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Virtualbox error rc=-1904 (Solved)

Post by farkas »

Trying to run VB but I keep getting 'Kernel driver not installed (rc=-1904)' error message.
Looked through Mint Forums and on line, but I didn't find anything that would help me.
Here is my system info:

Code: Select all

steve@steve ~ $ inxi -Fxz
System:    Host: steve Kernel: 4.15.0-38-generic x86_64 bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.9 (Gtk 3.22.30-1ubuntu1)
           Distro: Linux Mint 19 Tara
Machine:   Device: desktop System: ASUS product: All Series serial: N/A
           Mobo: ASUSTeK model: Z97-A-USB31 v: Rev 1.xx serial: N/A
           UEFI: American Megatrends v: 2501 date: 06/24/2015
Battery    hidpp__0: charge: N/A condition: NA/NA Wh
           model: Logitech Wireless Mouse M325 status: Discharging
CPU:       Quad core Intel Core i5-4690K (-MCP-) 
           arch: Haswell rev.3 cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 28001
           clock speeds: max: 4300 MHz 1: 1000 MHz 2: 1483 MHz 3: 1242 MHz
           4: 1281 MHz
Graphics:  Card: NVIDIA GM206 [GeForce GTX 950] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 )
           drivers: nouveau (unloaded: modesetting,fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           OpenGL: renderer: NV126 version: 4.3 Mesa 18.0.5 Direct Render: Yes
Audio:     Card-1 NVIDIA Device 0fba driver: snd_hda_intel bus-ID: 01:00.1
           Card-2 Intel 9 Series Family HD Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-38-generic
Network:   Card: Intel Ethernet Connection (2) I218-V
           driver: e1000e v: 3.2.6-k port: f040 bus-ID: 00:19.0
           IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 1256.3GB (35.5% used)
           ID-1: /dev/sda model: MKNSSDRE256GB size: 256.1GB
           ID-2: /dev/sdb model: WDC_WD10EZEX size: 1000.2GB
Partition: ID-1: / size: 219G used: 53G (26%) fs: ext4 dev: /dev/sda2
           ID-2: swap-1 size: 17.11GB used: 0.00GB (0%)
           fs: swap dev: /dev/sda3
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 29.8C mobo: 27.8C
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 182 Uptime: 37 min Memory: 3770.7/15977.1MB
           Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 
steve@steve ~ $ 
This is a screen shot showing the error message:


Screenshot from 2018-11-07 19-06-47.png
I'd appreciate help solving this problem.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
ajgringo619

Re: Virtualbox error rc=-1904

Post by ajgringo619 »

What version of VirtualBox is this? How did you install it?
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

VirtualBox Graphical User Interface Version 5.2.10_Ubuntu r121806
Installed it using Software Manager
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
ajgringo619

Re: Virtualbox error rc=-1904

Post by ajgringo619 »

Did you get any errors during the installation? It looks like the kernel modules failed to build; can you post your /var/log/vbox-install.log file?
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

No error messages during install.

Code: Select all

steve@steve ~ $ /var/log/vbox-install.log
bash: /var/log/vbox-install.log: No such file or directory
steve@steve ~ $ 
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
ajgringo619

Re: Virtualbox error rc=-1904

Post by ajgringo619 »

Hmmm...the error message suggests reinstalling the virtualbox-dkms package. Try that and see if it makes any difference. If not, I would suggest installing the latest VB packages from https://www.virtualbox.org/wiki/Linux_Downloads. I went through the process of adding VB to my sources so it would update whenever everything else did. Also, let me know if there are any new log files created and if any show anything important.
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

A fresh clean install sounds like a better solution, rather than trying to patch the current one.
Can you give me the commands to install from https://www.virtualbox.org/wiki/Linux_Downloads.
Do I have to uninstall the current installation of VB, how to do that if that is necessary?
How do I add VB to my sources?
Thanks!
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
ajgringo619

Re: Virtualbox error rc=-1904

Post by ajgringo619 »

I would definitely remove your current VB install first. The below instructions come directly from the link I gave you earlier:

Code: Select all

sudo echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" >> /etc/apt/sources.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.2
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

Tried it but I get
[codesteve@steve ~ $ sudo echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" >> /etc/apt/sources.list
bash: /etc/apt/sources.list: Permission denied
steve@steve ~ $
][/code]
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
ajgringo619

Re: Virtualbox error rc=-1904

Post by ajgringo619 »

Sorry about that; just add everything in quotes to the /etc/apt/sources.list file using your favorite text editor (as root, of course).
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

I must be doing something wrong. I can't seem to get it to work. Here is the code I entered and the results:

Code: Select all

steve@steve ~ $ /etc/apt/sources.list "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" >> /etc/apt/sources.list
bash: /etc/apt/sources.list: Permission denied
steve@steve ~ $ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
[sudo] password for steve: 
Sorry, try again.
[sudo] password for steve: 
OK
steve@steve ~ $ sudo echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" >> /etc/apt/sources.list
bash: /etc/apt/sources.list: Permission denied
steve@steve ~ $ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
OK
steve@steve ~ $ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease          
Ign:3 http://packages.linuxmint.com tara InRelease                             
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]    
Hit:5 http://packages.linuxmint.com tara Release                               
Hit:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                
Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]    
Fetched 158 kB in 1s (110 kB/s)                                      
Reading package lists... Done
steve@steve ~ $ sudo apt-get install virtualbox-5.2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package virtualbox-5.2 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 'virtualbox-5.2' has no installation candidate
steve@steve ~ $ 
Ran VB, still the same errors.
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
ajgringo619

Re: Virtualbox error rc=-1904

Post by ajgringo619 »

OK, let's try this again (you did remove your current VirtualBox installation, correct?):

Code: Select all

sudo chmod 666 /etc/apt/sources.list
echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" >> /etc/apt/sources.list
sudo chmod 644 /etc/apt/sources.list
sudo apt-get update
sudo apt-get install virtualbox-5.2
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

Must have screwed up something again.
Since your last post I went into software manager and removed all instances of VB.
Copied and pasted the last set of commands into a text editor with elevated privileges.
Copied and pasted from text editor into terminal and ran.
Now there is an icon for Oracle VM VirtualBox in admin menu.
Version 5.2.20 r125813 (Qt5.9.5)
Now I get a different error.
How do I install /sbin/vboxdrv
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
User avatar
Pierre
Level 21
Level 21
Posts: 13223
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Virtualbox error rc=-1904

Post by Pierre »

you don't - that's an Terminal command ..

so, from Terminal run that /sbin/vboxconfig prefaced by sudo
then type your normal password & hit Enter Key

watch what happens in the terminal interface, for any errors.
- if there is none, then try running Vbox again. ..
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

Ran command, result: steve@steve ~ $ sudo -i
[sudo] password for steve:
root@steve:~# sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
root@steve:~# /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
root@steve:~#
root@steve:~#
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
User avatar
Pierre
Level 21
Level 21
Posts: 13223
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Virtualbox error rc=-1904

Post by Pierre »

last year, I'd been having that Virtualbox error rc=-1904 issue,
and only solved that, by Completely Removing Vbox in Package Manager,
& then re-installing again, with a file from the VirtualBox site itself:
https://www.virtualbox.org/wiki/Linux_Downloads
and I've no issues, ever since.
8)
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
User avatar
farkas
Level 5
Level 5
Posts: 552
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Virtualbox error rc=-1904

Post by farkas »

Tried removing VB via package manager, get the following error;
(Reading database ... 728626 files and directories currently installed.)
Removing virtualbox-5.2 (5.2.20-125813~Ubuntu~bionic) ...
dpkg: error processing package virtualbox-5.2 (--remove):
installed virtualbox-5.2 package pre-removal script subprocess returned error exit status 1
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
Errors were encountered while processing:
virtualbox-5.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Virtualbox error rc=-1904

Post by thx-1138 »

...go into your BIOS, disable Secure Boot.
Then, apt purge virtualbox* && apt install virtualbox-5.2, and reboot once again (just in case).
ajgringo619

Re: Virtualbox error rc=-1904

Post by ajgringo619 »

stevep3129 wrote: Thu Nov 08, 2018 3:23 am Ran command, result: steve@steve ~ $ sudo -i
[sudo] password for steve:
root@steve:~# sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
root@steve:~# /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
root@steve:~#
root@steve:~#
OK, what does dmesg report? What about /var/log/vbox-install.log? My original theory about the kernel modules not building is sounding more probable.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Virtualbox error rc=-1904

Post by thx-1138 »

...to clarify something: there exists no error rc=-1904.
That's an unfortunate misleading typo from the OP: it states error rc=-1908.
Besides obviously having a careful look at the printscreens above, someone can also look it up here.

The difference between the 1st photo & the 2nd photo:
in the first instance the end-user is asked to possibly install virtualbox-dkms.
Oracle, in their builds, has eliminated virtualbox-dkms since...5.1.x
However, Canonical still maintains such for...5.2.x - why, i wouldn't want to know... :wink:
In any case, with the 5.2.x package from Oracle's repo above,
virtualbox-dkms is obsolete & unneeded: it's not dkms that failed.

...in the OP's inxi i see that he/she has an Nvidia card, and also, that the nouveau driver is currently being used.
As far as i'm aware, NVidia's closed source driver either needs Secure Boot disabled, or else, it needs to be manually signed.
And that, although admittedly partially guesswork, is what re-enforces my suspicion that Vbox above,
(regardless of dkms or not), doesn't work due to Secure Boot being enabled.
And hopefully that's indeed the case here, as such can be very easily resolved.

...one more note (to the OP):
stevep3129 wrote: Wed Nov 07, 2018 11:53 pm

Code: Select all

steve@steve ~ $ /var/log/vbox-install.log
bash: /var/log/vbox-install.log: No such file or directory
steve@steve ~ $ 
If needed, either cat /var/log/vbox-install.log (not really convenient, it's a relatively big file),
or more simply, xed /var/log/vbox-install.log
Locked

Return to “Virtual Machines”