Install VirtualBox on Ubuntu 12.10

First, follow the instructions in the official link:

https://www.virtualbox.org/wiki/Linux_Downloads


So, add one of the following lines according to your distribution to your /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian trusty contrib
deb http://download.virtualbox.org/virtualbox/debian saucy contrib
deb http://download.virtualbox.org/virtualbox/debian raring contrib
deb http://download.virtualbox.org/virtualbox/debian quantal contrib
deb http://download.virtualbox.org/virtualbox/debian precise contrib
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
deb http://download.virtualbox.org/virtualbox/debian wheezy contrib
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free

1) For Ubuntu 12.10, we add

deb http://download.virtualbox.org/virtualbox/debian quantal contrib

2) Downloading and registering Oracle public key for apt-secure
:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

3) To install VirtualBox, do

sudo apt-get update
sudo apt-get install virtualbox-4.3

4) Ubuntu/Debian users might want to install thedkms package to ensure that the VirtualBox host kernel modules (vboxdrv,vboxnetflt andvboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade.

sudo apt-get install dkms

5) Start VirtualBox, there is a warnning:

root@Kitty:/home/aegis# virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.5.0-17-generic) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /etc/init.d/vboxdrv setup

         You will not be able to start VMs until this problem is fixed.

6) Run what it told me, another issue occurs:

root@Kitty:/home/aegis# sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Your kernel headers for kernel 3.5.0-17-generic cannot be found.
Please install the linux-headers-3.5.0-17-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
 ...failed!
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)

7) This time we install linux-headers-3.5.0-17-generic as it told me:

root@Kitty:/home/aegis# sudo apt-get install linux-headers-3.5.0-17-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  linux-headers-3.5.0-17-generic
0 upgraded, 1 newly installed, 0 to remove and 473 not upgraded.
Need to get 946 kB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu/ quantal/main linux-headers-3.5.0-17-generic amd64 3.5.0-17.28 [946 kB]
Fetched 946 kB in 2s (404 kB/s)                         
Selecting previously unselected package linux-headers-3.5.0-17-generic.
(Reading database ... 142701 files and directories currently installed.)
Unpacking linux-headers-3.5.0-17-generic (from .../linux-headers-3.5.0-17-generic_3.5.0-17.28_amd64.deb) ...
Setting up linux-headers-3.5.0-17-generic (3.5.0-17.28) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.5.0-17-generic /boot/vmlinuz-3.5.0-17-generic

8) Run /etc/init.d/vboxdrv setup again:

root@Kitty:/home/aegis# sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.

9) Start VirtualBox and it seems everything is fine:

root@Kitty:/home/aegis# virtualbox
root@Kitty:/home/aegis# 




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值