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 ...
随机推荐
- 一个获取本机ip地址的正则
ifconfig|grep -oP '(?<=inet addr:)(?=(?!127\.0\.0\.1))\d+(\.\d+){3}'
- binTreepreorderTraversal二叉树前序遍历
原题 Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binar ...
- ExtJS5入门
https://www.cnblogs.com/xiaoliu66007/p/7988060.html
- Java Socket入门
Java Socket底层采用TCP/IP协议通信,通信细节被封装,我们仅仅需要指定IP.端口,便能轻易地创建TCP或UDP连接,进行网络通信.数据的读写,可以使用我们熟悉的stream进行操作. T ...
- Linux服务器---配置nfs
配置nfs NFS服务的主要配置文件为/etc/exports./etc/exports文件内容格式: <输出目录> 客户端(选项:访问权限,用户映射,其他) 1.输出目录 输出目录是指N ...
- 创建一个简单的WCF程序2——手动开启/关闭WCF服务与动态调用WCF地址
一.创建WCF服务器 1.创建WCF服务器的窗体应用程序 打开VS2010,选择文件→新建→项目菜单项,在打开的新建项目对话框中,依次选择Visual C#→Windows→Windows窗体应用程序 ...
- vue生命周期图示中英文版Vue实例生命周期钩子
vue生命周期图示中英文版Vue实例生命周期钩子知乎上近日有人发起了一个 “react 是不是比 vue 牛皮,为什么?” 的问题,Vue.js 作者尤雨溪12月4日正面回应了该问题.以下是尤雨溪回复 ...
- 浅析PAC,修改PAC文件及user-rule文件实现自动代理
浅析PAC,修改PAC文件及user-rule文件实现自动代理 代理自动配置(英语:Proxy auto-config,简称PAC)是一种网页浏览器技术,用于定义浏览器该如何自动选择适当的代理服务器来 ...
- php 网站301重定向设置代码实战案例
php 网站301重定向设置代码实战案例 301重定向就是页面永久性移走的意思,搜索引擎知道这个页面是301重定向的话,就会把旧的地址替换成重定向之后的地址. 302重定向就是页面暂时性转移,搜索引擎 ...
- nginx FastCGI错误Primary script unknown解决办法
在centos上成功编译安装nginx 1.4.php 5.4并成功启动nginx和php-fpm后,访问php提示"File not found.",同时在错误日志中看到: 复制 ...