kali linux安装virtualbox的问题以及解决方法
admin
2023-02-03 13:42:41
0

以下是官方安装说明:

Debian-based Linux distributions

Add the following line to your /etc/apt/sources.list. According to your distribution, replace '' with 'eoan', 'bionic', 'xenial', 'buster', 'stretch', or 'jessie' (older versions of VirtualBox supported different distributions):

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian 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)

The key fingerprint for oracle_vbox.asc is

7B0F AB3A 13B9 0743 5925  D9C9 5442 2A4B 98AB 5139
Oracle Corporation (VirtualBox archive signing key)

(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?

sudo -s -H

apt-get clean

rm /var/lib/apt/lists/*

rm /var/lib/apt/lists/partial/*

apt-get clean

apt-get update

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,成功了。

相关内容

热门资讯

阿联酋航空发文致歉 7月23日,阿联酋航空发布致歉信:原计划于7月22日从迪拜飞往上海的阿联酋航空EK302航班,因恶劣...
给“南海仲裁案”递刀子的美国人... 执笔/李小飞刀7月12日晚,菲律宾内格罗斯东方省锡布兰镇的一处公寓内,突然响起一阵枪声,美国海洋生物...
特朗普称沙特加入《亚伯拉罕协议... △美国总统特朗普(资料图)当地时间7月23日,美国总统特朗普在社交媒体“真实社交”上发文表示,美国能...
硬核首发+增购订单!成都企业上... 7月22日,2026国际低空经济博览会在上海开幕,来自成都的沃飞长空集中发布三大重磅成果:全新AE2...
国际观察:中拉人工智能合作持续... 张冰倩 为进一步支持全球人工智能发展、推进全球人工智能能力建设,未来5年,中国将面向发展中国家提供5...
共商汽车产业全球合作新路径 G... 当前,汽车产业正加速向绿色化、智能化、国际化、融合化发展,汽车供应链受到大国竞争与地缘政治冲突扰动。...
内蒙古耕种收综合机械化率达91... 7月22日,记者从2026年中国农机推广田间日活动上获悉,内蒙古农作物耕种收综合机械化率达到91%,...
华为黄健:在算力、存力和运力三... 7月17日至20日,以“智能伙伴,共创未来”为主题的2026世界人工智能大会(WAIC)暨人工智能全...
苹果、谷歌都没留住月之暗面创始... 英国《金融时报》7月23日刊发评论《为什么美国正在失去中国人工智能明星?》,文章谈到,月之暗面(Mo...
陪伴大家十几年的充电宝,大概要... 要说这两年最尴尬的数码配件,托尼觉得充电宝绝对算一个。 以前它的对手还都是同行 —— 大家一起卷容量...