先看在Fedora8中使用VirtualBox虛擬機的效果圖吧
我們在Fedora8下無法使用VirtualBox虛擬機,是因為Fedora8升級內核的原因或是在安裝VirtualBox時候沒有內核原碼,運行VirtualBox時會出現下面錯誤
VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason.
Re-setup the kernel module by executing ‘/etc/init.d/vboxdrv setup’
as root.
當我們運行
[OrientSun@localhost ~]$ sudo /etc/init.d/vboxdrv setup //重新編譯VirtualBox的內核出現下面的錯誤
Stopping VirtualBox kernel module: vboxdrv. [確定]
Recompiling VirtualBox kernel module: vboxdrv [失敗]
* Look at /var/log/vbox-install.log to find out what went wrong
我就用:gedit /var/log/vbox-install.log
我的裡面說明沒有安裝gcc和沒有內核原碼,內核原碼一般放在usr/src/kernels/這個目錄下
於是我就用
[OrientSun@localhost ~]$ yum inteall gcc 因為重新編譯內核要用gcc,我現在一般是搞J2EE開發的所以在安裝Fedora 8時我沒有安裝gcc,如果你選了的,可以不用安裝了,
現在就是下載內核原碼了,下載以前要看看自己的內核版本號喲,用下面的命令
[OrientSun@localhost ~]$ uname -rm
2.6.23.9-85.fc8 i686
//紅色的就是版本號了,呵呵!現在就到網上去下載2.6.23.9-85.fc8 i686內核原碼吧!,我選擇的是rpm包,因為你只要雙擊他就可以自動為你解壓好,kernel-devel-2.6.23.9-85.fc8 i686.rpm解壓的目錄是
/usr/src/kernels/2.6.23.9-85.fc8-i686
下載地址在下面:
http://hany.sk/mirror/fedora/updates/8/i386/kernel-devel-2.6.23.9-85.fc8.i686.rpm
下載回來後,直接雙擊OK,他就會自動解壓到/usr/src/kernels/2.6.23.9-85.fc8-i686目錄下
現在我們在來運行
[OrientSun@localhost ~]$ sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [確定]
Recompiling VirtualBox kernel module [確定]
Starting VirtualBox kernel module [確定]
成功了!你現在可以成功運行VirtualBox了
再看看我的運行效果圖吧!