以下是官方安装说明:
Debian-based Linux distributions
Add the following line to your /etc/apt/sources.list. According to your distribution, replace '<mydist>' with 'eoan', 'bionic', 'xenial', 'buster', 'stretch', or 'jessie' (older versions of VirtualBox supported different distributions):
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian <mydist> contrib
The Oracle public key for apt-secure can be downloaded
here for Debian 8 ("Jessie") / Ubuntu 16.04 ("Xenial") and later
here for older distributions.
You can add these keys with
sudo apt-key add oracle_vbox_2016.asc
sudo apt-key add oracle_vbox.asc
or combine downloading and registering:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
The key fingerprint for oracle_vbox_2016.asc is
B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>
The key fingerprint for oracle_vbox.asc is
7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>
(As of VirtualBox 3.2, the signing key was changed. The old Sun public key for apt-secure can be downloaded here.)
To install VirtualBox, do
sudo apt-get update
sudo apt-get install virtualbox-6.1
Replace virtualbox-6.1 by virtualbox-6.0 or virtualbox-5.2 to install the latest VirtualBox 6.0 or 5.2 build.
What to do when experiencing The following signatures were invalid: BADSIG ... when refreshing the packages from the repository?
1.1 安装官方手册安装,提示依赖关系未满足
1.2 到Debian软件仓库搜索提示中的依赖包,并下载
1.3 安装下载好的依赖包,其中有依赖包提示冲突,怎么办?本来想把有冲突的依赖包卸载掉,但是仔细一看,该依赖包上有许多常用软件依赖,不可以卸载。另辟蹊径吧。
2号坑
2.1 安装完成后,启动virtualbox,提示严重错误,信息如下:
'''
创建 VirtualBoxClient COM 对象失败.
应用程序将被中断.
被召者 RC: NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154)
'''
2.2 网上查了一圈,有说是文件被锁,有说是磁盘空间不够,等等。试了一下,没有解决问题。以下记录了一下尝试操作,没有什么用处哈(请直接忽略该部分)。
'''
rm: 无法删除'p3x-onenote/63/locales/am.pak': 只读文件系统
root@kali:/snap/p3x-onenote/63# mount
root@kali:/snap/p3x-onenote/63# mount -o remount,rw /snap/p3x-onenote/63
'''
2.3 重新回到错误提示上来,"被召者 RC: NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154)",是不是没有注册呢?
前面安装时,有一步是下载并注册key,会不会是这一步出了问题?
卸载virtualbox,重新获取key,再注册。
wget https://www.virtualbox.org/download/oracle_vbox_2016.asc
apt-key add oracle_vbox_2016.asc
wget https://www.virtualbox.org/download/oracle_vbox.asc
apt-key add oracle_vbox.asc
2.4 再执行安装,成功咯!!
完整安装:
方法一:手动下载安装包安装
1.查看当前kali linux kernel版本
root@kali:~# uname -r
可以看到当前系统是kernel 5.4.0,说明是基于Debian 10(版本代号:buster)
2.官方下载对应版本安装包
https://www.virtualbox.org/wiki/Linux_Downloads
https://download.virtualbox.org/virtualbox/6.1.4/virtualbox-6.1_6.1.4-136177~Debian~buster_amd64.deb
3.设置更新源
将原来的/etc/apt/source.list备份:cp /etc/apt/source.list /etc/apt/source.list.bak
再把/etc/apt/source.list里面的内容全部删掉,重新写入以下信息,保存关闭文档。
#VirtualBox Debian Stretch
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian buster contrib
deb https://download.virtualbox.org/virtualbox/debian buster contrib
4.下载Oracle public key
cd /tmp
wget https://www.virtualbox.org/download/oracle_vbox_2016.asc
wget https://www.virtualbox.org/download/oracle_vbox.asc
5.注册Oracle public key
apt-key add oracle_vbox_2016.asc
apt-key add oracle_vbox.asc
6.安装virtualbox
apt-get update
apt-get upgrade
dpkg -i virtualbox-6.1_6.1.4-136177~Debian~buster_amd64.deb
7.记得恢复source.list文档原来的内容
方法二:apt安装
前面5步和方法一相同,第6步如下:
apt-get update
apt-get upgrade
apt-get install virtualbox-6.1
如遇到提示依赖包未满足,请到Debian软件仓库搜索,若搜索不到,可以尝试到Ubuntu软件仓库查找。
下载好后,dpkg -i手动安装依赖包,之后在进行virtualbox安装。
启动virtualbox,在终端中输入virtualbox,成功了。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。