【发布时间】:2015-04-17 22:46:24
【问题描述】:
我想将laravel homestead 用于我的开发机器并成功安装了virtualbox 和vagrant,但是当我运行vagrant up 时出现此错误:
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The host path of the shared folder is missing: ~/Code
Homestead.yaml 文件如下所示:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
hhvm: true
databases:
- homestead
variables:
- key: APP_ENV
value: local
这些是默认设置,但它们不适用于我的机器 - 我什至没有 /home/vagrant 文件夹,也没有 ~/Code 在我能看到的任何地方。我正在使用ubuntu 12.04 - 请您指出我应该如何配置我的设置,因为官方文档我有点迷路了。
【问题讨论】:
-
您是否尝试在您的根目录中创建一个文件夹
Code?您的本地机器,即不在虚拟机中。 Homestead 抱怨找不到该目录,因此无法将虚拟机中的/home/vagrant/Code连接到该目录。
标签: laravel vagrant virtualbox development-environment homestead