【问题标题】:Failed to listen on localhost:8000 (reason: Cannot assign requested address)无法在 localhost:8000 上侦听(原因:无法分配请求的地址)
【发布时间】: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 

如何解决这个问题?

【问题讨论】:

标签: laravel laravel-5


【解决方案1】:

这通常是因为端口已在使用中,或者在当前主机上不可用。

您可以使用此命令运行 php artisan serve --port=8080

【讨论】:

    猜你喜欢
    • 2015-09-22
    • 2011-11-30
    • 1970-01-01
    • 2022-07-01
    • 2023-04-10
    • 1970-01-01
    • 2016-02-23
    • 1970-01-01
    相关资源
    最近更新 更多