歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> VirtualBox安裝增強功能時The headers for the current running kernel were not found

VirtualBox安裝增強功能時The headers for the current running kernel were not found

日期:2017/2/28 14:31:45   编辑:Linux教程

環境:主系統:windows XP

virtualbox版本:4.3.8

guest系統:Ubuntu12.04.4

現在官網上只能下到ubuntu12.04.4,聽說virtualbox的版本對ubuntu增強的安裝影響很大,網上查資料說對ubuntu12.04至少得用vbox4.2.12,結果下載安裝後,在安裝增強時出錯:

Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...done.
Building the shared folder support module ...failed.

......

網上搜原因,有說 缺少kernal的頭文件

於是按鏈接的方法處理

sudo apt-get install dkms build-essential linux-headers-$(uname -r)
sudo /etc/init.d/vboxadd setup

結果還是沒反應,繼續搜,有人說virtualbox版本過低有影響,於是提高版本為virtualbox4.2.20,結果還是一樣。。尼瑪,頭大了

於是一狠心繼續提版本 virtualbox4.3.8,心想這次再不行就是ubuntu的內核版本問題了吧,已經做好了重下ubuntu的准備。。

安裝好virtualbox4.3.8後,再按上文方法處理,結果成功了!

這些東西的各個版本很奇怪,我明明網上看有人用4.2.12也能安裝成功,不解不解。。不過多嘗試總是能成功的= =

在 Ubuntu 12.10 中使用 Virtualbox 安裝 Win7 http://www.linuxidc.com/Linux/2012-11/74195.htm

Ubuntu中用VirtualBox虛擬機安裝Windows XP完整圖解 http://www.linuxidc.com/Linux/2010-09/28435p8.htm

VirtualBox 虛擬機安裝 Ubuntu 13.10 截圖 http://www.linuxidc.com/Linux/2013-11/92698.htm

Ubuntu安裝虛擬機軟件 VirtualBox 4.3.10 http://www.linuxidc.com/Linux/2014-03/99113.htm

VirtualBox 的詳細介紹:請點這裡
VirtualBox 的下載地址:請點這裡

Copyright © Linux教程網 All Rights Reserved