【发布时间】:2016-08-18 07:36:32
【问题描述】:
当我在 Ubuntu 上运行 php artisan serve 时,Laravel 开发服务器尝试在 http://localhost:8000/ 上启动,但失败并出现以下错误:
[Mon Apr 25 10:28:08 2016] 无法在 localhost:8000 上侦听(原因:无法分配请求的地址)
我的主机文件 (/etc/hosts/):
1 27.0.0.1 localhost
如何解决这个问题?
【问题讨论】:
-
你的hosts文件中的“1”和“2”之间真的有空格吗?