gpt4 book ai didi

vagrant - 名称为 'homestead' 的 VirtualBox 计算机已存在

转载 作者:行者123 更新时间:2023-12-03 04:46:49 29 4
gpt4 key购买 nike

自 homestead 2.0 以来 homestead laravel 一直无法工作

我不知道为什么“homestead init”会在 mydirectory/.homestead 中创建一个 Homestead.yaml 文件并且不在项目目录中。 Homestead up 或 Vagrant up 创建以下消息

名称为“homestead”的 VirtualBox 计算机已存在。

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
A VirtualBox machine with the name 'homestead' already exists.
Please use another name or delete the machine with the existing
name, and try again.

最佳答案

我通过使用vboxmanage来获取虚拟机的ID来解决。

$ vboxmanage list vms
"my-vm" {c700b8b6-b766-4638-871b-736b44b7db18}

将所需虚拟机的 ID(c700…db18 字符串)复制到 ~/.vagrant/machines/default/virtualbox/id 的内容中。保存文件,然后运行 ​​vagrant up 以使虚拟机正常工作,而无需销毁它。

关于vagrant - 名称为 'homestead' 的 VirtualBox 计算机已存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26993903/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com