手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

CentOS安装VirtualBox

[日期:2012-11-10] 来源:Linux社区  作者:acongzuibang [字体:大 中 小]
4 安装软件包

[root@CentOS ~]# rpm -ivh dkms-2.2.0.3-1.noarch.rpm

Preparing... ########################################### [100%]

1:dkms ########################################### [100%]

[root@centos ~]# rpm -ivh VirtualBox-4.1-4.1.10_76795_rhel5-1.x86_64.rpm

warning: VirtualBox-4.1-4.1.10_76795_rhel5-1.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 98ab5139

Preparing... ########################################### [100%]

1:VirtualBox-4.1 ########################################### [100%]

注:先要安装dkms在装virtualbox,要不然会报错,会说你缺少依赖包



5 启动virtualbox

[root@centos ~]# /etc/init.d/vboxdrv setup

Stopping VirtualBox kernel modules [确定]

Uninstalling old VirtualBox DKMS kernel modules [确定]

Trying to register the VirtualBox kernel modules using DKMSError! echo

Your kernel headers for kernel 2.6.18-194.el5 cannot be found at

/lib/modules/2.6.18-194.el5/build or /lib/modules/2.6.18-194.el5/source.

[失败]

(Failed, trying without DKMS)

Recompiling VirtualBox kernel modules [失败]

失败了,为么呢?就是内核的原因,都说要重启了,看下grub配置文件

[root@centos ~]# vim /boot/grub/grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/sdb6

# initrd /initrd-version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

initrd /initrd-2.6.18-308.16.1.el5.img

这呢,虽然没重启但是也排在了首位,那么重启下看看

[root@centos ~]# reboot

[root@centos ~]# uname -a

Linux centos 2.6.18-308.16.1.el5 #1 SMP Tue Oct 2 22:01:43 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

[root@centos ~]# /etc/init.d/vboxdrv setup

Stopping VirtualBox kernel modules [确定]

Uninstalling old VirtualBox DKMS kernel modulesError! There are no instances of module: vboxhost

4.1.10 located in the DKMS tree.

[确定]

Trying to register the VirtualBox kernel modules using DKMS[确定]

Starting VirtualBox kernel modules [确定]

看,VirtualBox 起来了

到此,virtualbox安装结束。啥?不知道咋用?问谷老师去。^_^linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款