zoukankan      html  css  js  c++  java
  • ubuntu12.04 + virtualbox

    今天启动virtualbox,竟然报错, 并提示运行/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 DKMS Error! Your kernel headers for kernel 3.2.0-65-generic cannot be found.
    Please install the linux-headers-3.2.0-65-generic package,
    or use the --kernelsourcedir option to tell DKMS where it's located

    * Failed, trying without DKMS
    * Recompiling VirtualBox kernel modules
    * Look at /var/log/vbox-install.log to find out what went wrong    //去日志里面查了, kernel header 未找到问题

    百度查了一下 , 发现有人用VMware Tools也碰到过类似的问题 , 

    先检查:

    uname -a   //查看当前kernel版本

    解决方案

     sudo apt-get update                         // 更新

     sudo apt-get autoremove                 //  删除没有用的           报错会提示运行sudo apt-get -f install    //  Error: Unmet dependencies. Try using -f.

     sudo apt-get install build-essential   //  编译程序有了这个软件包 它才知道 头文件在哪 才知道库函数在哪  关于build-essential作用见备注链接

    sudo apt-get install linux-headers-3.2.0-65-generic // 安装对应版本的,如果不知道自己当前kernel版本,可以用uname -a查看

    sudo /etc/init.d/vboxdrv setup         //成功了 , 说明它找到对应的header了

    备注链接:

    http://baike.baidu.com/view/4126257.htm?fr=aladdin  //讲DKMS的

    http://www.cppblog.com/wuxu/archive/2013/10/25/203913.html  //VMware Tools碰到同样问题的人

    http://blog.163.com/zhangjinqing1234@126/blog/static/307302602009538137113  //build-essential作用

    1、以专家为榜样,不必自己重新探索
    2、解构技能,找出实现80%效果的那20%
    3、不要一心二用
    4、练习练习再练习!然后获得即时反馈
    5、坚持,不要在低谷期放弃
  • 相关阅读:
    洛谷 P1508 Likecloud-吃、吃、吃
    Codevs 1158 尼克的任务
    2017.10.6 国庆清北 D6T2 同余方程组
    2017.10.6 国庆清北 D6T1 排序
    2017.10.3 国庆清北 D3T3 解迷游戏
    2017.10.3 国庆清北 D3T2 公交车
    2017.10.3 国庆清北 D3T1 括号序列
    2017.10.4 国庆清北 D4T1 财富
    2017.10.7 国庆清北 D7T2 第k大区间
    2017.10.7 国庆清北 D7T1 计数
  • 原文地址:https://www.cnblogs.com/zhongyuan/p/3822286.html
Copyright © 2011-2022 走看看