VirtualBox在Ubuntu下無法安裝Guest Additions

剛剛在VirtualBox 4.2.4裝了Ubuntu 12.10,安裝完畢後要安裝Guest Additions卻發生錯誤,按照console的提示把訊息印出來 /var/log/vboxadd-install.log 錯誤大概是這樣的:

Error: unable to find the sources of your current Linux kernel.

Google後發現這篇討論串

然後發現先安裝下列的套件然後再安裝Guest Additions,就可以了!

sudo apt-get install dkms build-essential linux-headers-generic