zoukankan      html  css  js  c++  java
  • 本机环境virtualbox出现问题重装

    vagrant reload 的时候 电脑卡住死机了,然后我重启了以后就没办法启动了,于是重装这个 vagrant

    使用  sudo apt-get remove vagrant  然后如果清除不干净就  sudo apt-get autoremove  执行一下

    然后重新安装  sudo apt-get install vagrant 

    然后是virtualbox的清理

     sudo apt-get remove virtualbox 

     sudo apt-get autoremove 

    之后看这篇文章

    https://phoenixnap.com/kb/install-virtualbox-on-ubuntu

    ubuntu 安装 virtualbox 我使用的就是

    sudo apt-get update
    sudo apt-get install virtualbox–6.0

    之后我重新启动,遇到一个提示

    The following SSH command responded with a non-zero exit status.
    Vagrant assumes that this means the command failed!
    
    DEBIAN_FRONTEND=noninteractive apt-get install -y linux-headers-`uname -r` dkms
    
    Stdout from the command:
    
    
    
    Stderr from the command:
    
    E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
    

    然后我就 sudo vagrant ssh 进去

    手动执行 

    sudo DEBIAN_FRONTEND=noninteractive apt-get install -y linux-headers-`uname -r` dkms

    然后提示我

    E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

    我就再次执行 

    sudo dpkg --configure -a

    然后就顺利执行了 结果如下:

    sudo DEBIAN_FRONTEND=noninteractive apt-get install -y linux-headers-`uname -r` dkms
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    dkms is already the newest version (2.2.0.3-2ubuntu11.8).
    linux-headers-4.4.0-142-generic is already the newest version (4.4.0-142.168).
    The following packages were automatically installed and are no longer required:
      libmcrypt4 libpcre2-16-0 libpcre2-32-0 libpcre2-8-0 libpcre2-dev libpcre2-posix2 libzip4
    Use 'sudo apt autoremove' to remove them.
    The following additional packages will be installed:
      nodejs
    The following packages will be upgraded:
      nodejs
    1 upgraded, 0 newly installed, 0 to remove and 233 not upgraded.
    1 not fully installed or removed.
    Need to get 0 B/18.2 MB of archives.
    After this operation, 118 kB of additional disk space will be used.
    (Reading database ... 95928 files and directories currently installed.)
    Preparing to unpack .../nodejs_12.18.3-1nodesource1_amd64.deb ...
    Detected old npm client, removing...
    Unpacking nodejs (12.18.3-1nodesource1) over (12.18.2-1nodesource1) ...
    Processing triggers for man-db (2.7.5-1) ...
    Setting up nodejs (12.18.3-1nodesource1) ...

    然后我  sudo vagrant reload --provision  就可以了

  • 相关阅读:
    解决Android SDK Manager无法更新下载
    使用Anaconda3配置多版本Python虚拟开发环境
    Python·Jupyter Notebook各种使用方法
    学习 python 编写规范 pep8 的问题笔记
    ajax工作原理及其优缺点
    json和jsonp
    cookie、session、localStorage、sessionStorage区别
    浅谈前端性能优化(PC版)
    浅谈前端性能优化(移动端)
    前端优化 -- Combo Handler
  • 原文地址:https://www.cnblogs.com/lizhaoyao/p/13366316.html
Copyright © 2011-2022 走看看