Laravel宅基地不工作的“游民上升”命令
问题描述:
我试图建立宅基地我laravel项目,文档以下内容: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 homestead文档中,我看不到任何我错过的东西。
答
在你homestead.yaml
文件你得到如下:
folders:
-
map: 'C:\xampp\htdocs\liveandnow'
to: /home/vagrant/Code
这必须是不带引号
folders:
-
map: C:\xampp\htdocs\liveandnow
to: /home/vagrant/Code
让我知道是否能解决你的问题
答
找到解决问题。 原来我的BIOS中没有启用VT
不,它不是?项目简单地'流浪'https://laravel.com/docs/5.5/homestead –