[Virtualbox] unable to find the sources of your current Linux kernel解決辦法

2013-12-30 Virtualbox

今天再請同事幫忙裝Linux virtualbox的時候,他遭遇的問題寫下紀錄

是有關於kernel complie的問題

在update Kernel的時候,沒有在預設開啟啟動新的kernel,造成他在安裝virtualbox的時候一直出現kernel complie錯誤

vbox-install.log
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

在此篇記錄此訊息

update kernel並安裝編譯工具
step.1> yum intstall gcc make kernel-devel cpp

設定kernel預設開機
step.2> /boot/grub/menu.list
default=0

但在同事安裝的案例上,older kernel & new kernel 的 id都是0,所以不管怎麼reboot都是從older kernel開機,並且沒有kernel選單的畫面。

把new kernel 改為1
root (hd0,1)
default=1

shell>reboot

reboot後檢查目前kernel版本是否是update最新的kernel
shell>uname -r

重新安裝Virtualbox
shell> rpm -ivh VirtualBox-4.3-4.3.6_91406_el6-1.i686.rpm


可以看到在安裝時,找不到編譯的kernel之後會嘗試重新complie
No precompiled module for this kernel found — trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

在這段已經開始進行complie囉!稍等一下完成complie就可以使用了。
Recompiling VirtualBox kernel modules [  OK  ]

給 Mr. 沙先生一點建議

彙整

分類

展開全部 | 收合全部

License

訂閱 Mr. 沙先生 的文章

輸入你的 email 用於訂閱