每次我从我的控制台运行宅基地时都会出错 有人可以帮我解决一下吗?
homestead.bat up
C:/Users/Evan Oscar/AppData/Roaming/Composer/vendor/laravel/homestead/Vagrantfile:17:in `read': No such file or directory - C:/cygwin64/home/Evan Oscar/.homestead/Homestead.yaml (Errno::ENOENT)
from C:/Users/Evan Oscar/AppData/Roaming/Composer/vendor/laravel/homestead/Vagrantfile:17:in `block in <top (required)>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `block in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/vagrantfile.rb:28:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in `vagrantfile'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:441:in `host'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:207:in `block in action_runner'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:428:in `hook'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:673:in `unload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in `ensure in <main>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in `<main>'
这是我的homestead.yaml文件:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
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
databases:
- homestead
variables:
- key: APP_ENV
value: local
我怀疑我的文件夹名称可能有问题? 因为我使用&#34; Evan Oscar&#34;或者我安装宅基地时可能会遇到什么? 请有人帮我这个吗? 我在网上搜索解决方案,但没有一个真正有用
答案 0 :(得分:1)
我将从头开始解释这些步骤,以便检查您是否做错了。我建议你删除你的宅基文件夹并尝试重新安装它以查看会发生什么。
您是在本地还是在全球安装了宅基地?
(例如git clone https://github.com/laravel/homestead.git Homestead
或composer global require laravel/homestead
)
如果答案是本地的,你需要进入克隆宅基地时创建的文件夹,然后运行此命令来初始化宅基地的配置文件(〜/ .homestead / Homestead.yaml或c:\ users \ username.homestead \ Homestead.yaml for windows)
bash init.sh
如果您在全局安装它,您可以从任何地方使用此命令。之后,您只需按照doc中的说明配置Homestead.yaml文件。
别忘了创建
ssh-keygen -t rsa -C "you@homestead"
我注意到你正在使用homestead.yaml配置的默认样式,尝试更改网址以获得更像窗口的格式
authorize: c:\Users\username\.ssh\homestead_rsa.pub
keys:
- c:\Users\username\.ssh\homestead_rsa
folders:
- map: C:\
只有这样你才能运行
homestead up