cd 进入目录:/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 clan all
yum makecache
yum list | grep VirtualBox
yum install yum install VirtualBox-6.0.x86_64