Vagrant命令在没有Sudo的情况下不起作用

问题描述 投票:-1回答:1

我已经在MacOS中使用Vagrant安装了宅基。我已经使用Virtual Box进行了全部安装,但是当我尝试在终端中使用vagrant命令运行虚拟机时出现此错误:

The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.

我尝试使用sudo vagrant up,它可以工作,但不是最佳选择。有人可以帮助我吗?

有终端错误的屏幕截图:Terminal Error with command vagrant up and vagrant ssh.

terminal vagrant virtual-machine virtualbox homestead
1个回答
0
投票

尝试删除.vagrant目录

rm -r .vagrant

我怀疑您将项目文件夹从一个地方复制或移动到了另一个地方。

或者,您需要更新.vagrant /中的creator_uid文件。签出this blog post

© www.soinside.com 2019 - 2024. All rights reserved.