我在安装Laravel / Homestead时遇到了一些问题。当我运行$ vagrant box add laravel/homestead
命令时,一切都很顺利,但我没有看到这一行,==> box: successfully added box 'laravel/homestead' (v0.4.2) for 'virtualbox'
!"但是,当我再次运行$ vagrant box add laravel/homestead
命令时,它显示以下内容,这意味着Laravel / Homestead已成功安装,对吧?或没有?如果不是,我将如何删除我安装的所有流浪文件?我会按照惯例,转到控制面板并选择卸载程序,还是那还不够?谢谢你的帮助!
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://vagrantcloud.com/laravel/homestead
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.
1) parallels
2) virtualbox
3) vmware_desktop
Enter your choice: 2
==> box: Adding box 'laravel/homestead' (v4.0.0) for provider: virtualbox
The box you're attempting to add already exists. Remove it before
adding it again or add it with the `--force` flag.
Name: laravel/homestead
Provider: virtualbox
Version: 4.0.0
答案 0 :(得分:0)
你的第一次尝试确实有效,因为Vagrant告诉你实例已经存在...使用GitBash(假设你在Windows上)和一次终端模式
cd ~/Homestead (or try cd ~/.Homestead)
vagrant up
如果一切正常 - 您会看到消息正常,如果没有,您将收到错误
然后,您只需进入将创建项目的代码文件夹
cd ~/Code (code being the folder I want to create my Laravel projetcs)
composer create-project --prefer-dist laravel/laravel nameofproject
不确定上述是否有帮助。在我的例子中,宅基地文件位于/ users / myuser / Homestead文件夹中 - 但运气好