Page 1 of 1

Installation failure on Ubuntu 16.04 LTS: vboxdrv Required key not available

Posted: 9. Jan 2017, 19:31
by sbarrera
I have read on this forum that the vboxdrv kernel module needs to be signed. Otherwise my Ubuntu 16.04 LTS with UEFI secure boot will not allow vboxdrv to get installed:

Code: Select all

$ sudo modprobe -v vboxdrv
insmod /lib/modules/4.4.0-57-generic/misc/vboxdrv.ko 
modprobe: ERROR: could not insert 'vboxdrv': Required key not available
The author of that post gives instructions for how to create a key pair and sign it, etc. I think that is quite complex and before going that route I wanted to point out that the installation instructions for VirtualBox 5.1.12 here (www(dot)virtualbox(dot)org(slash)wiki(slash)Linux_Downloads) provide a public key from Oracle. There are also instructions for how to download it and add it with apt-key. I can see the keys with apt-key list:

Code: Select all

pub   4096R/2980AECF 2016-04-22
uid                  Oracle Corporation (VirtualBox archive signing key) <info@virtualbox(dot)org>
sub   4096R/920E471F 2016-04-22

pub   1024D/98AB5139 2010-05-18
uid                  Oracle Corporation (VirtualBox archive signing key) <info@virtualbox(dot)org>
sub   2048g/281DDC4B 2010-05-18
My question is do I really have to manually sign the kernel module or is there an installation step that is missing from the instructions that can explain why the Oracle public key is being provided and how to use it. My thought is that the kernel module might already be signed by Oracle and can be trusted. Do I really need to manually sign the kernel module?

Re: Installation failure on Ubuntu 16.04 LTS: vboxdrv Required key not available

Posted: 11. Jan 2017, 14:04
by zlodeh
I also have similar problems

I can not install virtualbox

Code: Select all

npacking virtualbox-dkms (5.0.24-dfsg-0ubuntu1.16.04.1) over (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Setting up virtualbox-dkms (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Loading new virtualbox-5.0.24 DKMS files...
Building only for 4.4.0-59-generic
Building initial module for 4.4.0-59-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.4.0-59-generic (x86_64)
Consult /var/lib/dkms/virtualbox/5.0.24/build/make.log for more information.
Job for virtualbox.service failed because the control process exited with error code. See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
log file

Code: Select all

KMS make.log for virtualbox-5.0.24 for kernel 4.4.0-59-generic (x86_64)
середа, 11 січня 2017 13:47:50 +0200
make: Entering directory '/usr/src/linux-headers-4.4.0-59-generic'
Makefile:693: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
  LD      /var/lib/dkms/virtualbox/5.0.24/build/built-in.o
  LD      /var/lib/dkms/virtualbox/5.0.24/build/vboxdrv/built-in.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.24/build/vboxdrv/linux/SUPDrv-linux.o
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
scripts/Makefile.build:258: recipe for target '/var/lib/dkms/virtualbox/5.0.24/build/vboxdrv/linux/SUPDrv-linux.o' failed
make[2]: *** [/var/lib/dkms/virtualbox/5.0.24/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
scripts/Makefile.build:403: recipe for target '/var/lib/dkms/virtualbox/5.0.24/build/vboxdrv' failed
make[1]: *** [/var/lib/dkms/virtualbox/5.0.24/build/vboxdrv] Error 2
Makefile:1420: recipe for target '_module_/var/lib/dkms/virtualbox/5.0.24/build' failed
make: *** [_module_/var/lib/dkms/virtualbox/5.0.24/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.4.0-59-generic'

Re: Installation failure on Ubuntu 16.04 LTS: vboxdrv Required key not available

Posted: 11. Jan 2017, 15:18
by Perryg
@zlodeh,

Your issue is something different.
  • "Makefile:693: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler"
Your compiler is not new enough for the running kernel. Update to a newer gcc.

Re: Installation failure on Ubuntu 16.04 LTS: vboxdrv Required key not available

Posted: 11. Jan 2017, 18:11
by sbarrera
Agreed. Different issue.