本机环境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  就可以了

 

posted @   李照耀  阅读(642)  评论(0编辑  收藏  举报
编辑推荐:
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
阅读排行:
· 在鹅厂做java开发是什么体验
· 百万级群聊的设计实践
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
点击右上角即可分享
微信分享提示