根据报错提示先安装dkms包
[root@OS4 ~]# rpm
-ivh dkms-2.2.0.3-3.2.noarch.rpm
warning: dkms-2.2.0.3-3.2.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID
16f4552c: NOKEY
Preparing...
########################################### [100%]
1:dkms
########################################### [100%]
[root@OS4 ~]# /etc/init.d/vboxdtrv setup
-bash: /etc/init.d/vboxdtrv: No such file or directory
[root@OS4 ~]# /etc/init.d/vbox
vboxautostart-service vboxballoonctrl-service
vboxdrv
vboxweb-service
[root@OS4 ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel
modules
[ OK ]
Uninstalling old VirtualBox DKMS kernel
modules
[ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-220.el6.x86_64 cannot be found at
/lib/modules/2.6.32-220.el6.x86_64/build or
/lib/modules/2.6.32-220.el6.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel
modules
[FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@OS4 ~]# yum install kernel-headerskernel-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirror01.idc.hinet.net
Setting up Install Process
No package kernel-headerskernel-devel available.
Error: Nothing to do
[root@OS4 ~]# yum install kernel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirror01.idc.hinet.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-358.14.1.el6 will be installed
--> Processing Dependency: kernel-firmware >= 2.6.32-358.14.1.el6 for
package: kernel-2.6.32-358.14.1.el6.x86_64
--> Running transaction check
---> Package kernel-firmware.noarch 0:2.6.32-220.el6 will be updated
---> Package kernel-firmware.noarch 0:2.6.32-358.14.1.el6 will be an update
--> Processing Conflict: kernel-2.6.32-358.14.1.el6.x86_64 conflicts
bfa-firmware < 3.0.3.1
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package bfa-firmware.noarch 0:3.0.0.0-1.el6 will be updated
---> Package bfa-firmware.noarch 0:3.0.3.1-1.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package
Arch
Version
Repository
Size
=======================================================================================================================================================================
Installing:
kernel
x86_64
2.6.32-358.14.1.el6
updates
26 M
Updating:
bfa-firmware
noarch
3.0.3.1-1.el6
base
723 k
Updating for dependencies:
kernel-firmware
noarch
2.6.32-358.14.1.el6
updates
11 M
Transaction Summary
=======================================================================================================================================================================
Install 1 Package(s)
Upgrade 2 Package(s)
Total download size: 38 M
Is this ok [y/N]: y
Downloading Packages:
(1/3):
bfa-firmware-3.0.3.1-1.el6.noarch.rpm
| 723 kB 00:01
(2/3): kernel-2.6.32-358.14.1.el6.x86_64.rpm
| 26 MB 00:26
(3/3):
kernel-firmware-2.6.32-358.14.1.el6.noarch.rpm
| 11 MB 00:11
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total
949 kB/s | 38 MB 00:40
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Updating :
kernel-firmware-2.6.32-358.14.1.el6.noarch
1/5
Installing :
kernel-2.6.32-358.14.1.el6.x86_64
2/5
Updating :
bfa-firmware-3.0.3.1-1.el6.noarch
3/5
Cleanup :
bfa-firmware-3.0.0.0-1.el6.noarch
4/5
Cleanup :
kernel-firmware-2.6.32-220.el6.noarch
5/5
Installed:
kernel.x86_64
0:2.6.32-358.14.1.el6
Updated:
bfa-firmware.noarch
0:3.0.3.1-1.el6
Dependency Updated:
kernel-firmware.noarch 0:2.6.32-358.14.1.el6
Complete!
[root@OS4 ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel
modules
[ OK ]
Uninstalling old VirtualBox DKMS kernel
modules
[ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-220.el6.x86_64 cannot be found at
/lib/modules/2.6.32-220.el6.x86_64/build or /lib/modules/2.6.32-220.el6.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel
modules
[FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@OS4 ~]# yum install make
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.163.com
Setting up Install Process
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Nothing to do
[root@OS4 ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel
modules
[ OK ]
Uninstalling old VirtualBox DKMS kernel
modules
[ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-220.el6.x86_64 cannot be found at
/lib/modules/2.6.32-220.el6.x86_64/build or
/lib/modules/2.6.32-220.el6.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel
modules
[FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@OS4 ~]# yum install kernel-headers
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirror01.idc.hinet.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kernel-headers.x86_64 0:2.6.32-279.5.2.el6 will be updated
---> Package kernel-headers.x86_64 0:2.6.32-358.14.1.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package
Arch
Version
Repository
Size
=======================================================================================================================================================================
Updating:
kernel-headers
x86_64
2.6.32-358.14.1.el6
updates
2.3 M
Transaction Summary
=======================================================================================================================================================================
Upgrade 1 Package(s)
Total download size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
kernel-headers-2.6.32-358.14.1.el6.x86_64.rpm
| 2.3 MB 00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating :
kernel-headers-2.6.32-358.14.1.el6.x86_64
1/2
Cleanup :
kernel-headers-2.6.32-279.5.2.el6.x86_64
2/2
Updated:
kernel-headers.x86_64
0:2.6.32-358.14.1.el6
Complete!
[root@OS4 2.6.32-220.el6.x86_64]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel
modules
[ OK ]
Uninstalling old VirtualBox DKMS kernel
modules
[ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-220.el6.x86_64 cannot be found at
/lib/modules/2.6.32-220.el6.x86_64/build or
/lib/modules/2.6.32-220.el6.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel
modules
[FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@OS4 2.6.32-220.el6.x86_64]# vi /var/log/vbox-install.log
Uninstalling modules from DKMS
removing old DKMS module vboxhost version 4.2.16
------------------------------
Deleting module version: 4.2.16
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS
Creating symlink /var/lib/dkms/vboxhost/4.2.16/source ->
/usr/src/vboxhost-4.2.16
DKMS: add completed.
Failed to install using DKMS, attempting to install without
Makefile:181: *** Error: unable to find the sources of your current Linux
kernel. Specify KERN_DIR= and run Make again. Stop.
[root@OS4 2.6.32-220.el6.x86_64]# yum install gcc kernel-devel kernel-headers
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirror01.idc.hinet.net
Setting up Install Process
Package gcc-4.4.7-3.el6.x86_64 already installed and latest version
Package kernel-headers-2.6.32-358.14.1.el6.x86_64 already installed and latest
version
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:2.6.32-358.14.1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package
Arch
Version
Repository
Size
=======================================================================================================================================================================
Installing:
kernel-devel
x86_64
2.6.32-358.14.1.el6
updates
8.2 M
Transaction Summary
=======================================================================================================================================================================
Install 1 Package(s)
Total download size: 8.2 M
Installed size: 24 M
Is this ok [y/N]: y
Downloading Packages:
kernel-devel-2.6.32-358.14.1.el6.x86_64.rpm
| 8.2 MB 00:08
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-devel-2.6.32-358.14.1.el6.x86_64
1/1
Installed:
kernel-devel.x86_64 0:2.6.32-358.14.1.el6
Complete!
[root@OS4 2.6.32-220.el6.x86_64]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel
modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-220.el6.x86_64 cannot be found at
/lib/modules/2.6.32-220.el6.x86_64/build or
/lib/modules/2.6.32-220.el6.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel
modules
[FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@OS4 2.6.32-220.el6.x86_64]# reboot
Broadcast message from root@OS4
(/dev/pts/0) at 14:42 ...
The system is going down for reboot NOW!
[root@OS4 2.6.32-220.el6.x86_64]# Last login: Mon Jul 22 11:59:41 2013 from
192.168.0.122
[root@OS4 ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel
modules
[ OK ]
Uninstalling old VirtualBox DKMS kernel modulesError! There are no instances of
module: vboxhost
4.2.16 located in the DKMS tree. [
OK ]
Trying to register the VirtualBox kernel modules using DKMS [
OK ]
Starting VirtualBox kernel
modules
[ OK ]
Normal 0 false 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16381228/viewspace-766849/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16381228/viewspace-766849/
1767

被折叠的 条评论
为什么被折叠?



