【问题标题】:bash init.sh is not creating my homestead.yaml file when trying to setup Homestead尝试设置 Homestead 时,bash init.sh 没有创建我的 homestead.yaml 文件
【发布时间】:2015-07-24 18:36:02
【问题描述】:

我正在尝试在 Windows 7 机器上安装和设置我的 VM/Homestead。我一直按照http://laravel.com/docs/5.1/homestead#installation-and-setup上的说明进行操作

但是,当尝试创建 Homestead.yaml 文件时,我得到以下信息

c:\sites\Homestead>bash init.sh
mkdir: cannot create directory `//.homestead': No such file or directory
cp: accessing `//.homestead/Homestead.yaml': No such host or network path
cp: accessing `//.homestead/after.sh': No such host or network path
cp: accessing `//.homestead/aliases': No such host or network path
Homestead initialized!

如何创建 homestead.yaml 文件?

这是 Homestead 文件夹中所有文件的列表

c:\sites\Homestead>dir
 Volume in drive C has no label.
 Volume Serial Number is CEB9-FADD

 Directory of c:\sites\Homestead

07/24/2015  11:21 AM    <DIR>          .
07/24/2015  11:21 AM    <DIR>          ..
07/24/2015  11:21 AM                14 .gitattributes
07/24/2015  11:21 AM                18 .gitignore
07/24/2015  11:21 AM               497 composer.json
07/24/2015  11:21 AM             4,171 composer.lock
07/24/2015  11:21 AM             1,220 homestead
07/24/2015  11:21 AM               270 init.sh
07/24/2015  11:21 AM             1,077 LICENSE.txt
07/24/2015  11:21 AM               155 readme.md
07/24/2015  11:21 AM    <DIR>          scripts
07/24/2015  11:21 AM    <DIR>          src
07/24/2015  11:21 AM               876 Vagrantfile
               9 File(s)          8,298 bytes
               4 Dir(s)  188,985,827,328 bytes free

另外一件事,我需要先安装composer然后再安装laravel吗?我有点困惑。在我看来,我需要打开一个控制台到虚拟机来安装作曲家。如果是这种情况,我如何从我的 Windows 7 笔记本电脑打开一个到 VM 的控制台?

【问题讨论】:

    标签: laravel laravel-5 virtualbox homestead


    【解决方案1】:

    我不确定这里的正确解决方案是什么,或者我的解决方法是否可行。

    这就是我所做的。

    我打开了init.sh文件并更改了行

    homesteadRoot=~/.homestead
    

    到“注意:请确保键入由 Git 克隆的“homestead”目录位置的正确路径”

    homesteadRoot=C:/sites/homestead
    

    这似乎奏效了。

    【讨论】:

      【解决方案2】:

      尝试在 Homestead 目录中的 git bash 中运行此命令(从 gi​​t 克隆的那个)。我猜普通窗口命令行无法识别 '~/' 。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-04-15
        • 1970-01-01
        • 2012-07-27
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多