Eu tinha caixa virtual OSE no antigo sistema Debian (wheezy?). Então eu atualizo para jessie e depois para esticar. Eu removi a caixa virtual para instalar a nova versão (5.1.28-117968 ~ Debian ~ stretch) dos repositórios da oracle, mas ela falhou enquanto fazia os drivers do kernel:
Setting up virtualbox-5.1 (5.1.28-117968~Debian~stretch) ...
addgroup: The group 'vboxusers' already exists as a system group.
Exiting.
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: failed: Look at /var/log/vbox-install.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
então eu verifiquei o arquivo de log e vi isso:
gcc -Wp,-MD,/tmp/vbox.3/.SUPDrvGip.o.d -nostdinc -isystem include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -O2 -fstack-protector-strong -g -pg -include /tmp/vbox.3/include/VBox/SUPDrvMangling.h -I/lib/modules/4.12.3/build/include -I/tmp/vbox.3/ -I/tmp/vbox.3/include -I/tmp/vbox.3/r0drv/linux -I/tmp/vbox.3/vboxdrv/ -I/tmp/vbox.3/vboxdrv/include -I/tmp/vbox.3/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS -fno-omit-frame-pointer -fno-pie -DMODULE -DKBUILD_BASENAME='"SUPDrvGip"' -DKBUILD_MODNAME='"vboxdrv"' -c -o /tmp/vbox.3/.tmp_SUPDrvGip.o /tmp/vbox.3/SUPDrvGip.c
as: error while loading shared libraries: libopcodes-2.24.90-system.20141023.so: cannot open shared object file: No such file or directory
como você pode ver, ele disse que não há nenhum arquivo libopcodes-2.24. Eu verifiquei e percebi que o trecho do Debian inclui libopcode-2.28:
$ find -name "libopcodes-*.so"
/usr/lib/x86_64-linux-gnu/libopcodes-2.28-system.so
Em outros sistemas com o Debian stretch vboxconfig use libopcodes-2.28 e tudo vai bem. Não consigo entender porque meu sistema pede 2.24 e não uso 2.28.
Alguma sugestão para corrigir? Eu usei o apt remover --purge virtualbox e reinstalar e não há mudança. Eu faço link simbólico de 2,28 para 2,24, mas também não ajuda.
Tags virtualbox debian compiling