虚拟机 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   看看有什么

centos VBoxLinuxAdditions 安装报错 Building the main Guest Additions module相关推荐

  1. VirtualBox+CentOS6.6安装增强功能包 - Building the main Guest Additions module [失败]

    在VirtualBox中安装CentOS6.5,在安装增强功能包时提示"Building the main Guest Additions module [失败]",解决方法如下: ...

  2. centos6.5 Building the main Guest Additions module

    virtualBox在执行 ./VBoxLinuxAdditions.run 时,出现Building the main Guest Additions module fail的错误信息 1.#yum ...

  3. Centos 7安装报错:Warning:dracut-initqueue timeout - starting timeout scripts

    首先打开UltraISO 打开镜像文件 点击工具栏中的第二个打开镜像文件工具,如图红色方框标志按钮,然后在打开的"打开ISO文件"对话框中找到我们下载好的Ubuntu镜像文件,之后 ...

  4. CentOS Redis安装报错:“You need tcl 8.5 or newer in order to run the Redis test”问题解决

    在编译Redis的时候成功之后,提示"Hint: It's a good idea to run 'make test' ;)",我们可以运行测试,确认Redis的功能是否正常. ...

  5. CentOS 7 安装报错:Cannot find a valid baseurl for repo: base/7/x86_6

    如果是docker中centos报错,则重启docker服务,service docker restart, 详细参考<docker端口映射或启动容器时报错>https://blog.cs ...

  6. centos 6安装报错

    Missing ISO 9660 imageThe installer has tried to mount image # 1. but cannot find it on the hard dri ...

  7. Python使用pip安装报错ModuleNotFoundError: No module named ‘pip._internal.cli.main‘的解决方法

    Python使用pip安装报错ModuleNotFoundError: No module named 'pip._internal.cli.main'的解决方法   大家好,我叫亓官劼(qí guā ...

  8. python的Scrapy框架安装报错:building 'twisted.test.raiser' extension error

    python的Scrapy框架安装报错:building 'twisted.test.raiser' extension 在https://www.lfd.uci.edu/~gohlke/python ...

  9. Kettle安装报错:Debug Exception in thread “main“ java.lang.NoClassDefFoundError解决方式

    标题:Kettle安装报错:Debug  Exception in thread "main" java.lang.NoClassDefFoundError: org/eclips ...

  10. centos使用yum命令安装报错 File /usr/bin/yum, line 30 except KeyboardInterrupt, e:

    原因 centos7使用yum命令安装报错如下: File "/usr/bin/yum", line 30except KeyboardInterrupt, e:^ SyntaxE ...

最新文章

  1. 使用 雨林木风 Ghost XP SP3 装机版 YN9.9 安装 Win7 (SP1)
  2. RDB 和 AOF 持久化的原理是什么?我应该用哪一个?它们的优缺点?
  3. 3 : 1,从21世纪科技趋势分析美国为什么一定要遏制华为
  4. 已禁用对分布式事务管理器(MSDTC)的网络访问。请使用组件服务管理工具启用 DTC 以便在 MSDTC 安全配置中进行网络访问。...
  5. Java数据结构——有序链表
  6. Speex回声消除原理深度解析
  7. java的几种对象(PO,VO,DAO,BO,POJO)解释
  8. 基于SpringBoot的CodeGenerator
  9. 当前主流的单元测试工具
  10. 计网笔记(一) 什么是因特网
  11. 用小乌龟git解决冲突之后,再提交,出现自己没用动过的文件
  12. handlersocket mysql,MySQL插件HandlerSocket
  13. 2022牛客多校J题 Serval and Essay
  14. C14:Unity3D制作智能家居设计软件——双屏互动室内漫游
  15. Mybatis Plugin 以及Druid Filer 改写SQL
  16. CSDN 上如何设置「关注博主」即可阅读全文
  17. LED光源的种类与LED光源与灯具的定义介绍
  18. 小米遭虚假评价后索赔 100 万元
  19. SIGIR‘20阿里巴巴利用Domain Adaptation在long-tail item上的实践
  20. 2022年全球市场男士防脱发和增长产品总体规模、主要生产商、主要地区、产品和应用细分研究报告

热门文章

  1. 亚信安全发现勒索软件新变种 Word文档成为导火索
  2. 29Flutter Sliver家族
  3. 上海亚商投顾:沪指缩量跌0.43%
  4. java实现excel转pdf_java实现excel转pdf(poi+itext)
  5. 清华大学计算机系学术委员会,清华大学学术委员会召开2018年度全体会议
  6. 关于工商银行网站打不开的问题终极解决办法
  7. 原生android7rom大小,红米7原生AOSP刷机包(系统刷机完整固件原生安卓9.0)
  8. 【技术】Modify short open tage in PHP configuration .
  9. hiberfil.sys文件删除
  10. 【笔记本双屏外界显示屏分辨率调高】解决方法