laravel - Laravel/Homestead IP 地址无效
问题描述
我正在使用 Laravel 6.2、Vagrant 2.2.6 和 VirtualBox 5.2。遵循 Homestead 设置教程。但是当我访问 myapp.local (开箱即用而不修改任何代码)时,我收到以下错误消息:
NotFoundHttpException in RouteCollection.php line 161
(请参阅下面的评论,解释我收到此错误的原因)
错误地,我修改了 Homestead.yaml 文件中的 IP 地址,现在,无论我做什么,我都会收到以下错误消息。
Network settings specified in your Vagrantfile define an invalid
IP address. Please review the error message below and update your
Vagrantfile network settings:
Address: 192.168.10:10
Netmask:
Error: invalid address
例子:
machine1234:Homestead my_user_name$ vagrant destroy
homestead: Are you sure you want to destroy the 'homestead' VM? [y/N] y
==> homestead: Destroying VM and associated drives...
machine1234:Homestead my_user_name$ vagrant up --provision
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Importing base box 'laravel/homestead'...
==> homestead: Matching MAC address for NAT networking...
==> homestead: Checking if box 'laravel/homestead' version '9.2.0' is up to date...
==> homestead: Setting the name of the VM: homestead
==> homestead: Clearing any previously set network interfaces...
Network settings specified in your Vagrantfile define an invalid
IP address. Please review the error message below and update your
Vagrantfile network settings:
Address: 192.168.10:10
Netmask:
Error: invalid address
Homestead.yaml 看起来像这样:
> --- ip: "192.168.10:10" memory: 2048 cpus: 2 provider: virtualbox
>
> authorize: ~/.ssh/id_rsa.pub
>
> keys:
> - ~/.ssh/id_rsa
>
> folders:
> - map: ~/Sites/myapp
> to: /home/vagrant/myapp
>
>
> sites:
> - map: myapp.local
> to: /home/vagrant/myapp/public
> databases:
> - MY_APP_DEV
>
> features:
> - mariadb: false
> - ohmyzsh: false
> - webdriver: false "Homestead.yaml" 41L, 667C
关于如何解决此问题的任何想法?
解决方案
您的 IP 地址有一个冒号!
改变:
Address: 192.168.10:10
到:
Address: 192.168.10.10
推荐阅读
- python - Python,Tkinter如何在按下时给optionmenu自己的窗口
- angular - Angular 5,请告诉我 ngx 在 FormlyFieldConfig 中正式支持的类型列表
- asp.net - 不支持该请求。在 ASP.net 中加密图像
- python - 将 FileField 转换为二进制文件,然后在 django 1.11 + python3 + rest_framework 中使用无损压缩和解压缩
- java - 我可以比较这样的结果集吗?我面临以下错误
- php - php重定向页面问题
- sql - 如果不是所有行都存在,则来自不同表的 sql server 计数
- docker - Docker Compose Nginx Link 容器
- numpy - Scipy - 求解形式的 ODE 系统:A*dy/dt = f(t, y)
- python - 嵌套字典的划分