Fedora 21 安装VirtualBox
注: 所有操作需要root权限 如果不是root用户在下面所有命令前加sudo
装dkms,kernel-devel,makecache:
yum install dkms
yum install kernel-devel
yum makecache
下载VirtualBox https://www.virtualbox.org/wiki/Linux_Downloads 并安装:
yum localinstall VirtualBox-4.3-4.3.8_92456_fedora18-.x86_64.rpm -y
安装完成,创建虚拟机并启动时遇到错误:
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing '/etc/init.d/vboxdrv setup' as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
于是编译 VirtualBox 内核:
[root@dev-zhanghua zhanghua]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMS[ OK ]
Starting VirtualBox kernel modules [ OK ]
如果出现以下错误, 是找不到内核对应的 kernel headers或内核版本不一致:
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 3.18.-.fc21.x86_64 cannot be found at
/lib/modules/3.18.-.fc21.x86_64/build or /lib/modules/3.18.-.fc21.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
查看内核版本:
[root@dev-zhanghua zhanghua]# uname -r
3.18.7-200.fc21.x86_64
查看已安装的内核版本:
[root@dev-zhanghua zhanghua]# rpm -qa|grep headers
kernel-headers-3.17.8-200.fc21.x86_64
glibc-headers-2.20-7.fc21.x86_64
发现版本不一致, 安装 kernel-headers-3.18.7-200.fc21.x86_64
yum install kernel-headers-3.18.7-200.fc21.x86_64
重启后二者版本一致:
[root@dev-zhanghua zhanghua]# uname -r
3.18.-.fc21.x86_64
[root@dev-zhanghua zhanghua]# rpm -qa|grep headers
kernel-headers-3.18.-.fc21.x86_64
glibc-headers-2.20-.fc21.x86_64
再次编译, 结果正常(编译VirtualBox 内核,如果失败,可能需要再次安装 dkms ):
[root@dev-zhanghua zhanghua]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMS[ OK ]
Starting VirtualBox kernel modules [ OK ]
或者再次检查kernel, kernel-modules, kernel-core, kernel-headers, kernel-devel版本是否与uname -r版本一致
[root@dev-zhanghua kernels]# uname -r
3.17.-.fc21.x86_6
[root@dev-zhanghua kernels]# rpm -qa|grep kernel
kernel-3.17.-.fc21.x86_64
kernel-modules-3.17.-.fc21.x86_64
kernel-headers-3.17.-.fc21.x86_64
kernel-core-3.17.-.fc21.x86_64
kernel-devel-3.17.-.fc21.x86_64
Fedora 21 安装VirtualBox的更多相关文章
- Fedora 21 安装 Nvidia 驱动以及失败后的补救方法
在 Linux 桌面系统下玩了这么久,大部分时间都是使用 Ubuntu,偶尔使用一下 Fedora.我的电脑中安装有多个 Linux 发行版,见这里<在同一个硬盘上安装多个Linux发行版及Fe ...
- Fedora 21 安装Infinality
原文地址: Fedora 21 用infinality美化你的字体 http://blog.csdn.net/element207/article/details/41746683 安装infinal ...
- Fedora 21 安装 Budgie Desktop
最新文章:Virson's Blog Budgie Desktop 是一款自由开源桌面,是 Evolve OS 的默认桌面,Evolve OS 是一款 OpenSUSE 的衍生系统.Budgie De ...
- Fedora 21 安装QQ国际版
首先安装依赖包 sudo yum install freetype.i686 libpng.i686 libgcc.i686 libXau.i686 点击下载wine-2012qq国际版 unzip ...
- Fedora 21 安装 Bumblebee with the NVIDIA proprietary drivers
最新文章:Virson's Blog 参考Fedora Wiki:http://fedoraproject.org/wiki/Bumblebee#Fedora_21
- Fedora 21 安装桌面环境
Mate桌面环境:$ sudo yum install @mate-desktop KDE桌面环境:$ sudo yum install @kde-desktop XFCE桌面环境:$ sudo yu ...
- 安装Fedora 21工作站后要做的10件事情
教程]安装Fedora 21工作站后要做的10件事情 2015-01-07 13:32 CSDN CODE 作者CSDN CODE 1 755 FedoraGNOMELinux Fedora 21已经 ...
- 在 CentOS 7.x / Fedora 21 上面体验 PHP 7.0
编译自:http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/作者: Aun Raza原创:LCTT https://li ...
- 在同一个硬盘上安装多个 Linux 发行版及 Fedora 21 、Fedora 22 初体验
在同一个硬盘上安装多个 Linux 发行版 以前对多个 Linux 发行版的折腾主要是在虚拟机上完成.我的桌面电脑性能比较强大,玩玩虚拟机没啥问题,但是笔记本电脑就不行了.要在我的笔记本电脑上折腾多个 ...
随机推荐
- 机器安装第二个tomcat ,出现报错如何解决
1.本机安装第二个 tomcat 后,出现 报错如下图所示 最后解决办法 是 在安装的时候 ,windows 服务名称 和 另一个tomcat 起不一样的 名称就可以了 如下图
- Git error: hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused b
hint: Updates were rejected because the remote contains work that you dohint: not have locally. This ...
- jboss as7 o.h.c.s.c.i.BroadcastGroupImpl Network is unreachable
Question: [Server:server-one] 22:52:56,876 ERROR [org.hornetq.core.server.cluster.impl.BroadcastGrou ...
- Please check if the Publishing Tools on the server (System/PublishingTools) are started.
ArcMap或ArcCatalog中双击连接到Server即可,该工具即自动可启动
- HIVE自定义函数 UDF
自定义my_md5hash 具体hive源码怎么调用看我另外一篇博客 package udf.hive.myudf; import org.apache.commons.codec.digest.Di ...
- Oracle 同步表权限分配(同义词)
新建了同义词之后还要 分配权限
- OfficePickers
OfficePickers http://www.codeproject.com/Articles/12327/Office-2003-Color-Picker 来自为知笔记(Wiz) 附件列 ...
- android 15 activity跳转
从一个屏幕跳到另一个屏幕,一个activity跳转到另一个activity,Intent类用于组件之间传递数据和跳转,组件包括不仅activity. package com.sxt.day04_01; ...
- MS SQL 性能优化
http://blog.csdn.net/dba_huangzj/article/details/50455543
- [转] CSS float 浮动属性
http://www.cnblogs.com/polk6/p/3142187.html CSS float 浮动属性 本篇主要介绍float属性:定义元素朝哪个方向浮动. 目录: 1. 页面布局方式: ...