centos 7 install VirtualBox

1. set the yum repository.架構

[root@localhost ~]# wget -P /etc/yum.repos.d http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
--2017-02-14 11:40:21--  http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
正在解析主機 download.virtualbox.org (download.virtualbox.org)... 65.200.22.33, 65.200.22.48
正在鏈接 download.virtualbox.org (download.virtualbox.org)|65.200.22.33|:80... 已鏈接。
已發出 HTTP 請求,正在等待迴應... 200 OK
長度:259 [text/plain]
正在保存至: 「/etc/yum.repos.d/virtualbox.repo」
 
100%[=========================================================================================================================================================================>] 259         --.-K/s 用時 0s      
 
2017-02-14 11:40:22 (32.0 MB/s) - 已保存 「/etc/yum.repos.d/virtualbox.repo」 [259/259])

2. search the available version of VirtualBoxui

[root@localhost ~]# yum search VirtualBox 
已加載插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
============================================================================================= N/S matched: VirtualBox =============================================================================================
VirtualBox-4.3.x86_64 : Oracle VM VirtualBox
VirtualBox-5.0.x86_64 : Oracle VM VirtualBox
VirtualBox-5.1.x86_64 : Oracle VM VirtualBox

3. install the specific version.this

[root@localhost ~]# yum install VirtualBox-5.1
已加載插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
正在解決依賴關係
--> 正在檢查事務
---> 軟件包 VirtualBox-5.1.x86_64.0.5.1.14_112924_el7-1 將被 安裝
--> 正在處理依賴關係 libSDL-1.2.so.0()(64bit),它被軟件包 VirtualBox-5.1-5.1.14_112924_el7-1.x86_64 須要
--> 正在檢查事務
---> 軟件包 SDL.x86_64.0.1.2.15-14.el7 將被 安裝
--> 解決依賴關係完成
 
依賴關係解決
 
===================================================================================================================================================================================================================
 Package                                             架構                                        版本                                                        源                                               大小
===================================================================================================================================================================================================================
正在安裝:
 VirtualBox-5.1                                      x86_64                                      5.1.14_112924_el7-1                                         virtualbox                                       75 M
爲依賴而安裝:
 SDL                                                 x86_64                                      1.2.15-14.el7                                               base                                            204 k
 
事務概要
===================================================================================================================================================================================================================
安裝  1 軟件包 (+1 依賴軟件包)
 
總下載量:75 M
安裝大小:168 M
Is this ok [y/d/N]: y

run config procedure, there will be message if there are errors..net

[root@localhost ~]# /sbin/vboxconfig 
vboxdrv.sh: Building VirtualBox kernel modules.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:
 
  yum install kernel-devel-3.10.0-327.36.2.el7.x86_64
(The last command may fail if your system is not fully updated.)
  yum install kernel-devel
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:
 
  yum install kernel-devel-3.10.0-327.36.2.el7.x86_64
(The last command may fail if your system is not fully updated.)
  yum install kernel-devel
 
There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.

install kernel插件

yum install kernel-devel
相關文章
相關標籤/搜索