溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

kali linux安裝virtualbox

發(fā)布時(shí)間:2020-08-06 02:22:32 來源:網(wǎng)絡(luò) 閱讀:307 作者:itsupportdhl 欄目:系統(tǒng)運(yùn)維

僅次記錄,不喜無噴,高手請(qǐng)繞行,謝謝!
反復(fù)折騰了一天,結(jié)果比較遺憾,沒有安裝成功。不過從過程中加深了對(duì)kali的認(rèn)識(shí)。
但是但是,么有放棄,最后安裝成功了?。?!
以前只知道更新源,讓apt-get自己去更新安裝依賴包。
現(xiàn)在曉得了,其實(shí)Debian有軟件倉庫,可以手動(dòng)去軟件倉庫搜索需要安裝的依賴包,然后下載,使用dpkg -i安裝。Ubuntu軟件倉庫中的依賴包(.deb)也可以用于Debian系統(tǒng)。
命令apt-get -f install和apt --fix-broken install在某種程度上可以自動(dòng)修復(fù)依賴關(guān)系,但不是萬能的。
另外,每個(gè)Debian版本都有各自的代號(hào),如Debian 9代號(hào)stretch
參考網(wǎng)站:
https://www.virtualbox.org/wiki/Linux_Downloads #virtualbox官方下載地址
https://www.debian.org/distrib/packages.zh-cn.html #Debian軟件倉庫

1.安裝過程中遇到的坑
1號(hào)坑
以下是官方安裝說明:
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?

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 安裝官方手冊(cè)安裝,提示依賴關(guān)系未滿足
1.2 到Debian軟件倉庫搜索提示中的依賴包,并下載
1.3 安裝下載好的依賴包,其中有依賴包提示沖突,怎么辦?本來想把有沖突的依賴包卸載掉,但是仔細(xì)一看,該依賴包上有許多常用軟件依賴,不可以卸載。另辟蹊徑吧。

2號(hào)坑
2.1 安裝完成后,啟動(dòng)virtualbox,提示嚴(yán)重錯(cuò)誤,信息如下:
'''
創(chuàng)建 VirtualBoxClient COM 對(duì)象失敗.
應(yīng)用程序?qū)⒈恢袛?
被召者 RC: NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154)
'''
2.2 網(wǎng)上查了一圈,有說是文件被鎖,有說是磁盤空間不夠,等等。試了一下,沒有解決問題。以下記錄了一下嘗試操作,沒有什么用處哈(請(qǐng)直接忽略該部分)。
'''
rm: 無法刪除'p3x-onenote/63/locales/am.pak': 只讀文件系統(tǒng)
root@kali:/snap/p3x-onenote/63# mount
root@kali:/snap/p3x-onenote/63# mount -o remount,rw /snap/p3x-onenote/63
'''
2.3 重新回到錯(cuò)誤提示上來,"被召者 RC: NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154)",是不是沒有注冊(cè)呢?
前面安裝時(shí),有一步是下載并注冊(cè)key,會(huì)不會(huì)是這一步出了問題?
卸載virtualbox,重新獲取key,再注冊(cè)。
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 再執(zhí)行安裝,成功咯??!

完整安裝:
方法一:手動(dòng)下載安裝包安裝
1.查看當(dāng)前kali linux kernel版本
root@kali:~# uname -r
可以看到當(dāng)前系統(tǒng)是kernel 5.4.0,說明是基于Debian 10(版本代號(hào):buster)

2.官方下載對(duì)應(yīng)版本安裝包
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.設(shè)置更新源
將原來的/etc/apt/source.list備份:cp /etc/apt/source.list /etc/apt/source.list.bak
再把/etc/apt/source.list里面的內(nèi)容全部刪掉,重新寫入以下信息,保存關(guān)閉文檔。
#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.注冊(cè)O(shè)racle 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.記得恢復(fù)source.list文檔原來的內(nèi)容
方法二:apt安裝
前面5步和方法一相同,第6步如下:
apt-get update
apt-get upgrade
apt-get install virtualbox-6.1

如遇到提示依賴包未滿足,請(qǐng)到Debian軟件倉庫搜索,若搜索不到,可以嘗試到Ubuntu軟件倉庫查找。
下載好后,dpkg -i手動(dòng)安裝依賴包,之后在進(jìn)行virtualbox安裝。

啟動(dòng)virtualbox,在終端中輸入virtualbox,成功了。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI