先不要这样装,有问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
用下面这种安装可能因为版本原因导致系统启动不成功,但是下面的连接给出了解决方案,建议先阅读下面的连接文章。
解决方案:
《CentOS7安装VirtualBox后系统起不来了:版本和vbox兼容很重要吧,不然VirtualBox起不来。》https://rtoax.blog.csdn.net/article/details/108139520
下载yum源
yum install gcc make patch glibc-headers glibc-devel kernel-headers kernel-devel
或者使用下面的源
cat /etc/yum.repos.d/virtualbox.repo
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
安装依赖
yum install gcc make patch glibc-headers glibc-devel kernel-headers kernel-devel
安装(注意:服务器可能会自动重启)
# yum search virtualbox
已加载插件:auto-update-debuginfo, fastestmirror, langpacks
Repository centos-qemu-ev is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: epel.mirror.angkasa.id
* epel-debuginfo: epel.mirror.angkasa.id
============================================= 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
VirtualBox-5.2.x86_64 : Oracle VM VirtualBox
VirtualBox-6.0.x86_64 : Oracle VM VirtualBox
VirtualBox-6.1.x86_64 : Oracle VM VirtualBox
名称和简介匹配 only,使用“search all”试试。
[root@localhost yum.repos.d]# yum install VirtualBox-6.1
已加载插件:auto-update-debuginfo, fastestmirror, langpacks
Repository centos-qemu-ev is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: epel.mirror.angkasa.id
* epel-debuginfo: epel.mirror.angkasa.id
正在解决依赖关系
--> 正在检查事务
---> 软件包 VirtualBox-6.1.x86_64.0.6.1.12_139181_el7-1 将被 安装
--> 解决依赖关系完成
依赖关系解决
===================================================================================================================
Package 架构 版本 源 大小
===================================================================================================================
正在安装:
VirtualBox-6.1 x86_64 6.1.12_139181_el7-1 virtualbox 96 M
事务概要
===================================================================================================================
安装 1 软件包
总下载量:96 M
安装大小:219 M
Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/virtualbox/packages/VirtualBox-6.1-6.1.12_139181_el7-1.x86_64.rpm: 头V4 DSA/SHA1 Sign
ature, 密钥 ID 98ab5139: NOKEYVirtualBox-6.1-6.1.12_139181_el7-1.x86_64.rpm 的公钥尚未安装
VirtualBox-6.1-6.1.12_139181_el7-1.x86_64.rpm | 96 MB 00:02:58
从 https://www.virtualbox.org/download/oracle_vbox.asc 检索密钥
导入 GPG key 0x98AB5139:
用户ID : "Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>"
指纹 : 7b0f ab3a 13b9 0743 5925 d9c9 5442 2a4b 98ab 5139
来自 : https://www.virtualbox.org/download/oracle_vbox.asc
是否继续?[y/N]:y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : VirtualBox-6.1-6.1.12_139181_el7-1.x86_64 1/1
Connection closed by foreign host.
Disconnected from remote host(10.170.7.166) at 15:07:15.
Type `help' to learn how to use Xshell prompt.
[c:\~]$