centos VBoxLinuxAdditions 安装报错 Building the main Guest Additions module
2016-08-23 18:28
330 查看
虚拟机 virtualbox, 安装操作系统centos6.5
报错信息如下:
$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.24 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.24 of VirtualBox Guest Additions...
Stopping VirtualBox Additions [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [确定]
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules [确定]
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-431.el6.x86_64
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 [确定]
$ 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.
解决方法:
1)安装 gcc make gcc-c++
#yum install gcc make gcc-c++
2)安装kernel-headers kernel-devel
#yum install kernel-headers kernel-devel
3)、如果还不行,就把centos所有包升级下
#yum update
4)、重启
#reboot
5)、重新安装
# mount -t auto /dev/cdrom /mnt/cdrom
#sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.24 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.24 of VirtualBox Guest Additions...
Stopping VirtualBox Additions [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [确定]
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules [确定]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module [确定]
Building the shared folder support module [确定]
Building the graphics driver module [确定]
Doing non-kernel setup of the Guest Additions [确定]
Starting the VirtualBox Guest Additions Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping. [确定]
PS:访问共享文件夹
重启之后,centos就可以访问Windows/mac提供的共享文件夹了。
mkdir /mnt/share 新建挂载点(mountpoint)
mount -t vboxsf mysharedir /mnt/share 挂载共享文件夹 ------------------mysharedir
是虚拟机中设置的共享文件夹名称
cd /mnt/share 进入共享文件夹
ls 看看有什么
报错信息如下:
$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.24 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.24 of VirtualBox Guest Additions...
Stopping VirtualBox Additions [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [确定]
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules [确定]
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-431.el6.x86_64
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 [确定]
$ 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.
解决方法:
1)安装 gcc make gcc-c++
#yum install gcc make gcc-c++
2)安装kernel-headers kernel-devel
#yum install kernel-headers kernel-devel
3)、如果还不行,就把centos所有包升级下
#yum update
4)、重启
#reboot
5)、重新安装
# mount -t auto /dev/cdrom /mnt/cdrom
#sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.24 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.24 of VirtualBox Guest Additions...
Stopping VirtualBox Additions [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [确定]
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules [确定]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module [确定]
Building the shared folder support module [确定]
Building the graphics driver module [确定]
Doing non-kernel setup of the Guest Additions [确定]
Starting the VirtualBox Guest Additions Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping. [确定]
PS:访问共享文件夹
重启之后,centos就可以访问Windows/mac提供的共享文件夹了。
mkdir /mnt/share 新建挂载点(mountpoint)
mount -t vboxsf mysharedir /mnt/share 挂载共享文件夹 ------------------mysharedir
是虚拟机中设置的共享文件夹名称
cd /mnt/share 进入共享文件夹
ls 看看有什么
相关文章推荐
- VirtualBox+CentOS6.6安装增强功能包 - Building the main Guest Additions module [失败]
- VirtualBox+CentOS6.5安装增强功能包 - Building the main Guest Additions module [失败]
- CentOS 6.3 中安装VirtualBOX增强工具失败:Building the main Guest Additions module[FAILED]
- 在VirtualBox虚拟机CentOS6.3安装VBoxAdditions时报错:“building the main Guest Additions module Failed”
- centos6.3下 Building the main Guest Additions module [Failed]
- virtualbox中fedora17安装增强工具失败 Building the main Guest Additions module [失败]
- Oracle VirtualBox 安装增强工具包:“building the main guest additions module 失败” 原因及解决方法
- Oracle VirtualBox 安装增强工具包:“building the main guest additions module 失败” 原因及解决方法
- centos6.5 Building the main Guest Additions module
- Building the main Guest Additions module
- Building the main Guest Additions module FAILED问题
- Building the main Guest Additions module [FAILED]
- Building the main Guest Additions module
- Building the main Guest Additions module [failed]
- VirtualBox中的Centos安装增强功能包VBoxLinuxAdditions和共享本机文件夹
- VirtualBox安装VBoxLinuxAdditions错误:unable to find the sources of your current linux kernel
- VirtualBox中的Centos安装增强功能包VBoxLinuxAdditions和共享本机文件夹
- centos下virtualbox里面xp 安装VBoxGuestAdditions
- VirtualBox安装VBoxLinuxAdditions错误:unable to find the sources of your current linux kernel
- VirtualBox安装VBoxLinuxAdditions错误:unable to find the sources of your current linux kernel