我正在尝试为我的laravel项目设置宅基地,遵循文档:
Per Project Installation
Instead of installing Homestead globally and sharing the same Homestead box across all of your projects, you may instead configure a Homestead instance for each project you manage. Installing Homestead per project may be beneficial if you wish to ship a Vagrantfile with your project, allowing others working on the project to simply vagrant up.
To install Homestead directly into your project, require it using Composer:
composer require laravel/homestead --dev
Once Homestead has been installed, use the make command to generate the Vagrantfile and Homestead.yaml file in your project root. The make command will automatically configure the sites and folders directives in the Homestead.yaml file.
Mac / Linux:
php vendor/bin/homestead make
Windows:
vendor\\bin\\homestead make
Next, run the vagrant up command in your terminal and access your project at http://homestead.app in your browser. Remember, you will still need to add an /etc/hosts file entry for homestead.app or the domain of your choice.
好的,一切似乎都很好:我的Homestead.yaml:
ip: 192.168.10.10
memory: 2048
cpus: 1
provider: virtualbox
authorize: 'C:\Users\pwojt\.ssh\id_rsa.pub'
keys:
- 'C:\Users\pwojt\.ssh\id_rsa'
folders:
-
map: 'C:\xampp\htdocs\liveandnow'
to: /home/vagrant/Code
sites:
-
map: liveandnow.com
to: /home/vagrant/Code/public
databases:
- liveandnow
name: liveandnow
hostname: liveandnow
但是我收到此错误消息:
λ vagrant up
Bringing machine 'liveandnow' up with 'virtualbox' provider...
==> liveandnow: Importing base box 'laravel/homestead'...
==> liveandnow: Matching MAC address for NAT networking...
==> liveandnow: Checking if box 'laravel/homestead' is up to date...
==> liveandnow: Setting the name of the VM: liveandnow
==> liveandnow: Fixed port collision for 80 => 8000. Now on port 2201.
==> liveandnow: Fixed port collision for 443 => 44300. Now on port 2202.
==> liveandnow: Fixed port collision for 3306 => 33060. Now on port 2203.
==> liveandnow: Fixed port collision for 5432 => 54320. Now on port 2204.
==> liveandnow: Fixed port collision for 8025 => 8025. Now on port 2205.
==> liveandnow: Fixed port collision for 27017 => 27017. Now on port 2206.
==> liveandnow: Fixed port collision for 22 => 2222. Now on port 2207.
==> liveandnow: Clearing any previously set network interfaces...
==> liveandnow: Preparing network interfaces based on configuration...
liveandnow: Adapter 1: nat
liveandnow: Adapter 2: hostonly
==> liveandnow: Forwarding ports...
liveandnow: 80 (guest) => 2201 (host) (adapter 1)
liveandnow: 443 (guest) => 2202 (host) (adapter 1)
liveandnow: 3306 (guest) => 2203 (host) (adapter 1)
liveandnow: 5432 (guest) => 2204 (host) (adapter 1)
liveandnow: 8025 (guest) => 2205 (host) (adapter 1)
liveandnow: 27017 (guest) => 2206 (host) (adapter 1)
liveandnow: 22 (guest) => 2207 (host) (adapter 1)
==> liveandnow: Running 'pre-boot' VM customizations...
==> liveandnow: Booting VM...
==> liveandnow: Waiting for machine to boot. This may take a few minutes...
liveandnow: SSH address: 127.0.0.1:2207
liveandnow: SSH username: vagrant
liveandnow: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
现在我检查了我的密钥,它们似乎与我文件中列出的位置相同。我在主机中添加了一行:
192.168.10.10 liveandnow.com
到文件的底部。从laravel宅基地文件中,我看不到任何我错过的东西。
答案 0 :(得分:0)
在struct S1 {
/// description
///
/// __returns__
/// blah blah
///
/// __parameters__
/// blah blah
var completion : (String, Int) -> (Bool)
}
文件中,您得到以下信息:
homestead.yaml
这需要没有引号
folders:
-
map: 'C:\xampp\htdocs\liveandnow'
to: /home/vagrant/Code
如果能解决您的问题,请告诉我
答案 1 :(得分:0)
找到问题的解决方案。 事实证明我的BIOS没有启用VT