dqknycyt92288 2014-12-02 16:57
浏览 69
已采纳

Laravel Homestead:'homestead init' - >无法打开输入文件

I am trying to install the latest version of Laravel Homestead on my PC and when I try running the command homestead init in my command terminal, I keep getting a "Could not open input file" error.

Steps I've taken so far with installing Laravel Homestead:

1) Created a new directory at C:\Users\Jeff\Desktop\Code
2) Installed Composer
3) Installed VirtualBox and Vagrant Box
4) In 'cmd', ran the command vagrant box add laravel/homestead
5) Copied the Composer files from C:\ProgramData\ComposerSetup\bin into my C:\Users\Jeff\Desktop\Code directory.
6) In 'cmd', ran the command composer global require "laravel/homestead=~2.0"

Since I am following the Laravel homestead installation guide the next step is to copy the ~/.composer/vendor/bin directory to my PATH so that the homestead command is executable but this is where I get confused.

I have tried a couple of things but they have not worked for me.

In my ~/.composer/vendor/bin directory, I have copied the homestead directory files into my C:\Users\Jeff\Desktop\Code directory but when I try running the command homestead init, I keep getting the error Could not open input file: C:\Users\Jeff\Desktop\Code/../laravel/homestead/homestead

  • 写回答

1条回答 默认 最新

  • douliaopan1419 2014-12-02 20:33
    关注

    On Windows use homestead.bat init instead of homestead init.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?