VirtualBoX虛擬機器裡安裝linux系統,在虛擬系統裡安裝增強功能報錯解決方案

來源:互聯網
上載者:User

當我們在虛擬機器裡安裝lixunx系統,避免不了的要安裝增強功能,無論是視覺效果還是物理機與虛擬機器共用檔案都是需要安裝增強功能的。當我們在進入虛擬系統安裝增強程式時可能會出現如下狀態:

[root@localhost VBOXADDITIONS_4.1.12_77245]# sh ./VBoxLinuxAdditions.run(增強程式)VirtualBox Guest Additions installerRemoving installed version 4.1.10 of VirtualBox Guest Additions...Removing existing VirtualBox DKMS kernel modules           [確定]Removing existing VirtualBox non-DKMS kernel modules       [確定]Building the VirtualBox Guest Additions kernel modulesThe headers for the current running kernel were not found. If the followingmodule compilation fails then this could be the reason.The missing package can be probably installed withyum install kernel-devel-2.6.18-238.el5Not building the VirtualBox advanced graphics driver as this Linux version istoo old to use it.Building the main Guest Additions module                   [失敗](Look at /var/log/vboxadd-install.log to find out what went wrong)Doing non-kernel setup of the Guest Additions              [確定]Installing the Window System driversInstalling X.Org 7.1 modules                               [確定]Setting up the Window System to use the Guest Additions    [確定]You may need to restart the hal service and the Window System (or just restartthe guest system) to enable the Guest Additions.Installing graphics libraries and desktop services componen[確定]/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again。 停止。Creating user for the Guest Additions.Creating udev rule for the Guest Additions kernel module.從上面的結果我們可以很清楚的看出來出現了一處錯誤,根據提示查看/var/log/vboxadd-install.log檔案會有下面的錯誤:[root@localhost VBOXADDITIONS_4.1.12_77245]# cat /var/log/vboxadd-install.log/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again。 停止。Creating user for the Guest Additions.Creating udev rule for the Guest Additions kernel module.通過上面的提示我們可以知道錯誤的原因是沒有核心原檔案解決方案如下:(下面的操作都是在虛擬電腦裡進行的不要理解成在物理機裡)一;先安裝下面的程式; gcc   kernel   kernel-devel程式說明gcc.i686 : 各類編譯器(C、C++、Objective-C、Java, ...)kernel.i686 : Linux 核心(Linux 作業系統的核心)kernel-devel.i686 : 用來構建與核心匹配的核心模組的開發軟體包。程式安裝[root@localhost VBOXADDITIONS_4.1.12_77245]#yum instal gcc.i686 kernel.i686 kernel-devel.i686(用yum安裝時最好先用yum search 搜尋下相應的程式,不同的版本可能會有不一樣的尾碼如有的可能是.i386)二;重新啟動電腦,啟動時系統會自動從新的核心檔案選項啟動不要改回到原來的選項預設就好了(回到原來的選項還會出現上面的錯誤)。從新安裝增強程式問題可以解決。
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.