我已经下载了一个 Vagrantfile,但是当我在终端中运行 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: ~/Sync
OBS.: 使用 Ubuntu 14.10
我在家里创建了一个名为 Sync 的文件夹。
最佳答案
根据 Vagrant docs 主机路径必须是绝对的(即 /home/user/Sync
)或相对于项目根目录(您的 Vagrantfile 所在的位置)。
相对于项目根目录意味着如果您的 Vagrantfile 位于 /home/user/MyProject
然后将路径设置为 "Sync"
将从 /home/user/MyProject/Sync
创建共享.
引用:http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
关于vagrant - 运行 vagrant : "The host path of the shared folder is missing" 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29055813/