因为在学习 docker 至 swarms,需要安装 docker-machine,所以也就需要安装 virtualbox。但是一直安装不成功, 下面是错误信息
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2019-02-22 12:36:01 CST; 22min ago
Process: 2000 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=1/FAILURE)
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:
kernel-devel kernel-devel-3.10.0-514.26.2.el7.x86_64
vboxdrv.service: control process exited, code=exited status=1
Failed to start VirtualBox Linux kernel module.
Unit vboxdrv.service entered failed state.
vboxdrv.service failed.
这是:kernel-devel
[root@VM_0_15_centos ~]# yum install kernel-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Package kernel-devel-3.10.0-957.5.1.el7.x86_64 already installed and latest version
Nothing to do
这是: kernel-headers
[root@VM_0_15_centos ~]# yum install kernel-headers
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Package kernel-headers-3.10.0-957.5.1.el7.x86_64 already installed and latest version
Nothing to do
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.