Przejdź do głównej zawartości

Instalacja VirtualBox Guest Additions w Centos 6.4 rozwiazanie problemu z /tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

Po instalacji Centos 6.4 na maszynie wirtualnej dobrze było by skorzystać z takich opcji jak współdzielony schowek pomiędzy maszyna wirtualna ,a gościem, możliwość udostępnienia folderu dla Centos z maszyny na jakim jest postawiona wirtualka itd. By wszystkie te funkcjonalności mogły działać prawidłowo trzeba zainstalować specjalne narzędzia nazywane w przypadku Virtualbox'a "Guest Additions". Nie zawsze jednak instalacja przebiega gładko i bezproblemowo i nieraz trzeba włożyć nieco dodatkowej pracy by wszystko działało taj jak należy. 



Często spotykanym problemem jest taki o to błąd :

Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.2.12 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
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.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-358.11.1.el6.x86_64

Building the main Guest Additions module                   [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions              [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.13 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[  OK  ]
Press Return to close this window...


Skierowani do pliku loga instalacyjnego znajdziemy w nim taki o to wpis:

/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.  Stop.


Pierwszym krokiem to upewnienie się, że w systemie mamy zainstalowane :

kernel.devel
kernel.headres

Istotne jest również by zainstalować odpowiednie wersje pakietów sugerowane w komunikacie instalacji:

yum install kernel-devel-2.6.32-358.11.1.el6.x86_64

--------------------------------------------------------------------

yum install gcc -y
yum install kernel-header -y
yum install kernel-devel -y

--------------------------------------------------------------------

Po powyższych zabiegach i ponownym uruchomieniu instalatora wszystko powinno być tak jak trzeba.

Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.2.12 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                   [  OK  ]
Building the shared folder support module                  [  OK  ]
Building the OpenGL support module                         [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
Starting the VirtualBox Guest Additions                    [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.13 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.


Installing graphics libraries and desktop services componen[  OK  ]
Press Return to close this window...



Teraz możemy cieszyć się już wszystkimi funkcjami oferowanymi przez VirtualBox.

Komentarze

Najczęściej czytane w tym miesiącu

50 popularnych pytań dotyczących systemu Linux zadawanych na rozmowach kwalifikacyjnych. (Pytania & Odpowiedzi)

Jak dodać użytkownika w systemie Windows z poziomu konsoli CMD? (net user, net localgroup)

Generowanie testowych plików o określonej wielkości