Centos7.5安装VirtualBox-5.2
1.查看自己的内核版本
[root@localhost /]# rpm -qa |grep kernel
kernel-tools-libs-3.10.0-862.6.3.el7.x86_64
kernel-ml-4.17.6-1.el7.elrepo.x86_64
kernel-tools-3.10.0-862.6.3.el7.x86_64
kernel-headers-3.10.0-862.6.3.el7.x86_64
2.查看yum中VirtualBox版本
[root@localhost /]# yum list | grep VirtualBox
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
VirtualBox-4.3.x86_64 4.3.40_110317_el7-1 virtualbox
VirtualBox-5.0.x86_64 5.0.40_115130_el7-1 virtualbox
VirtualBox-5.1.x86_64 5.1.38_122592_el7-1 virtualbox
VirtualBox-5.2.x86_64 5.2.16_123759_el7-1 virtualbox
最新版本为VirtualBox-5.2
3.导入epel安装源
yum install epel-release
4.添加VirtualBox安装源
# cd /etc/yum.repos.d/
# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
5.安装相关依赖包
# yum update
# yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
再次查看内核版本:
[root@localhost yum.repos.d]# rpm -qa |grep kernel
kernel-headers-3.10.0-862.11.6.el7.x86_64
kernel-ml-4.17.6-1.el7.elrepo.x86_64
kernel-tools-3.10.0-862.11.6.el7.x86_64
kernel-tools-libs-3.10.0-862.11.6.el7.x86_64
[root@localhost yum.repos.d]# uname -r
4.17.6-1.el7.elrepo.x86_64
发现kernel-headers,kernel-tools,kernel-tools-libs小版本升级了
6.安装VirtualBox
[root@localhost /]# yum install VirtualBox-5.2
7.启动
[root@localhost hongdada]# VirtualBox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.17.6-1.el7.elrepo.x86_64) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
Qt FATAL: QXcbConnection: Could not connect to display
明显内核版本冲突
重建VirtualBox内核模块:
[root@localhost yum.repos.d]# /usr/lib/virtualbox/vboxdrv.sh setup
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:
kernel-devel kernel-devel-4.17.6-1.el7.elrepo.x86_64
还是不行
安装低内核版本:
[root@localhost kernels]# yum install kernel-3.10.0-862.11.6.el7.x86_64
安装kernel-devel
yum install kernel-devel-3.10.0-862.11.6.el7.x86_64
再次查看内核版本:
[root@localhost yum.repos.d]# uname -r
4.17.6-1.el7.elrepo.x86_64
[root@localhost yum.repos.d]# rpm -qa |grep kernel
kernel-headers-3.10.0-862.11.6.el7.x86_64
kernel-ml-4.17.6-1.el7.elrepo.x86_64
kernel-tools-3.10.0-862.11.6.el7.x86_64
kernel-3.10.0-862.11.6.el7.x86_64
kernel-tools-libs-3.10.0-862.11.6.el7.x86_64
重启,选择低内核版本
8.低内核版本再次启动VirtualBox
查看内核版本,如果不一致,安装:
[root@localhost /]# yum install kernel-headers-$(uname -r) kernel-devel-$( uname -r) -y
再次重建VirtualBox内核模块
[root@localhost /]# /usr/lib/virtualbox/vboxdrv.sh setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
再次启动:
[root@localhost /]# VirtualBox
Qt FATAL: QXcbConnection: Could not connect to display
已放弃
[root@localhost /]# systemctl start vboxdrv.service
[root@localhost /]# systemctl status vboxdrv.service
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: disabled)
Active: active (exited) since 一 2018-09-03 15:13:15 CST; 55s ago
Process: 655 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=0/SUCCESS)
Memory: 0B
9月 03 15:11:14 localhost.localdomain systemd[1]: Starting VirtualBox Linux kernel module...
9月 03 15:11:17 localhost.localdomain vboxdrv.sh[655]: vboxdrv.sh: Starting VirtualBox services.
9月 03 15:11:17 localhost.localdomain vboxdrv.sh[990]: Starting VirtualBox services.
9月 03 15:11:17 localhost.localdomain vboxdrv.sh[655]: vboxdrv.sh: Building VirtualBox kernel modules.
9月 03 15:13:15 localhost.localdomain systemd[1]: Started VirtualBox Linux kernel module.
终于好了
参考:
https://www.cnblogs.com/harry-h/p/6405433.html
Centos7.5安装VirtualBox-5.2的更多相关文章
- centos7.5安装VirtualBox
centos7.5安装minikube时要求先安装VirtualBox 1.准备repo文件 [root@localhost yum.repos.d]# pwd /etc/yum.repos.d [r ...
- CentOS7.3安装VirtualBox
安装 DKMS.更新内核 # yum -y install gcc make glibc kernel-headers kernel-devel dkms Installed: dkms.noar ...
- Centos7.5 安装VirtualBox增强工具
一.安装 1.自带tools: 选择VirtualBox工具栏 => 设备 => 安装增强功能 2.挂载光驱 3.进入光驱目录,执行(一定要用root权限执行) ①安装gcc yum i ...
- centos7.5安装minikube kubernetes
前提:已安装centos7.5安装VirtualBox Minikube是什么?Minikube是一种方便在本地运行Kubernetes的工具. Minikube 是可以在VM中运行单节点的Kuber ...
- Ubuntu安装VirtualBox以及CentOS7.5联网设置
一.virtualBox的安装 官方Liunx版本下载地址: https://www.virtualbox.org/wiki/Linux_Downloads 这里选择下载ubuntu 16.04 ...
- 使用Ghost版本Windows7系统下载安装virtualBox和centos7异常解决
使用Ghost版本Windows7系统下载安装virtualBox和centos7异常解决: 下载安装运行virtualBox时出现获取VirtualBox对象严重错误(如图): 解决方案步骤: 在开 ...
- CentOS7安装virtualbox
1.进入virtualbox官网 https://www.virtualbox.org/ 2.点击download 3.点击Linux distributions 4.向下翻至如图,并且进入同种框选页 ...
- CentOS7 - 安装 VirtualBox
参考资料 最新的可用安装包可以从这里下载 VirtualBox 是 x86 硬件虚拟化产品,功能上与 VMware Server.KVM.及 Xen 类似,但是 VirtualBox 不修改 Linu ...
- 使用 yum 安装 virtualbox 虚拟机
我的环境是centos7,所以也可以说是在centos7下使用yum安装virtualbox,不过对于其他的LINUX发行版方法都一样. 下面的操作都是在命令行中进行的. 1.首先需要配置yum的源. ...
- centos6.7 安装 virtualBox 再安装 centos 7
Tag: 黄色为自己实际情况需要设置的部分,绿色部分为虚拟机名称(自定义) 1.创建虚拟机VBoxManage createvm --name centos7 --ostype Linux26_64 ...
随机推荐
- Oracle数据库分区相干知识点
Partition Characteristics:1.Partition Key;2.Partitioning Strategies Partitioning Strategies:1. range ...
- binTreePosterorderTraversal二叉树的后序遍历
描述: Given a binary tree, return the postorder traversal of its nodes' values. For example: Given bin ...
- gedit emacs
emacs常用操作: 1)C-g:退出当前命令 2)C-x C-f:搜索文件打开 3)C-s:向前搜索 C-r:向后搜索 4)C-x 2:水平分割窗口 C-x 3:竖直分割窗口 5)C-x o:切换窗 ...
- [10]Windows内核情景分析---中断处理
中断处理 每个cpu有一张中断表,简称IDT. IDT的整体布局:[异常->空白->5系->硬](推荐采用7字口诀的方式重点记忆) 异常:前20个表项存放着各个异常的描述符(IDT表 ...
- 关于this指向性的问题
函数调用 首先需要从函数的调用开始讲起. JS(ES5)里面有三种函数调用形式: func(p1, p2) obj.child.method(p1, p2) func.call(context, p1 ...
- xml 的 <![CDATA["URL"]]>
<![CDATA["URL"]]>:用于 xml 处理特殊字符,比如:& <PolicyURL><![CDATA[ http://ectp.t ...
- 【Alpha版本】冲刺阶段——Day5
[Alpha版本]冲刺阶段--Day5 阅读目录 今日进展 问题困难 明日任务 今日贡献量 站立式会议 TODOlist [今日进展] 完成登录类代码 public void LOGIN() { co ...
- MQ(转)
1. 到底什么时候该使用MQ? 1). 典型场景一:数据驱动的任务依赖 采用MQ的优点是: a. 不需要预留buffer,上游任务执行完,下游任务总会在第一时间被执行 b. 依赖多个任务,被多个任务依 ...
- MongoDB3.X单机及shading cluster集群的权限管理(基于3.4.5)
mongodb集群的权限管理分为两部分,一部分是最常用的Role-Based Access Control,也就是用户名密码方式,这种验证方式一般出现在单机系统,或者集群中client端连接Mongo ...
- TensorFlow入门,基本介绍,基本概念,计算图,pip安装,helloworld示例,实现简单的神经网络
TensorFlow入门,基本介绍,基本概念,计算图,pip安装,helloworld示例,实现简单的神经网络