If you upgrade the kernel version when the host OS is Linux, an error occurred when launching the virtual environment of VirtualBox, so a memorandum

When I started the virtual environment in Virtualbox on Linux with Ryzen CPU, an error occurred, so a memorandum

Premise

Environment Linux Mint Debian Edition 4 Ryzen3500U I am raising the kernel version during installation

python


$ uname -a
Linux PC name 5.6.0-0.bpo.2-amd64 #1 SMP Debian 5.6.14-2~bpo10+1 (2020-06-09) x86_64 GNU/Linux

When trying to import I get angry with an error like this Virtualbox_errorVirtualbox_error1.png1.png Virtualbox_error2.png

Exit code: NS_ERROR_FAILURE (0x80004005) Component: MachineWrap Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

Solution

For the time being

step 1


$ sudo /sbin/vboxconfig 
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting 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.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-5.6.0-0.bpo.2-amd64
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.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-5.6.0-0.bpo.2-amd64

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

I'm angry that there is no kernel header file, so install the header

Step 2


$ sudo apt install -y linux-headers-amd64 linux-headers-5.6.0-0.bpo.2-amd64

afterwards

Step 3


$ sudo /sbin/vboxconfig 
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

Happy start The end

Recommended Posts

If you upgrade the kernel version when the host OS is Linux, an error occurred when launching the virtual environment of VirtualBox, so a memorandum
It is good to create an environment with runtime error => venv when using pyplot backends of macosx on a virtual environment created with virtualenv.
If you get a no attribute error in boto3, check the version
What to do if you are told "Import Error: cannot import name'HTTPSHandler'" when building a virtual environment using virtualenv
About the virtual environment of python version 3.7
A quick overview of the Linux kernel
If you think the PyCharm environment is broken, it's because of the file name
If you get a long error when tabbing an interactive shell with Anaconda
If you want to enter the virtual environment with jupyter, nb_conda_kernels is recommended
A convenient function memo to use when you want to enter the debugger if an error occurs when running a Python script.