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 就可以了