hugo报告端口1313已被使用。但不是

问题描述 投票:0回答:1

我一如既往地尝试运行Hugo server命令。但这给了我这个错误。

port 1313 already in use, attempting to use an available port
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1654d87]

我使用netstat -ntlp检查端口使用情况,但在列表中什么都没有找到。

我之前遇到过这个问题,当时,我只是使用snap package manager卸载了hugo,然后再次重新安装。那个时候它奏效了。现在没有。

我在这里想念什么。注意:重新启动笔记本电脑也无济于事。

static port hugo
1个回答
0
投票

我建议您通过使用hugo server-p标志在动态,专用或临时端口(49152至65535)上运行--portal,例如:

hugo server -p 51000

我现在总是这样做是因为我也经历了端口1313的怪异。我在Debugging Your Hugo Website上写了这件事。

有关端口号的信息,请参见https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

© www.soinside.com 2019 - 2024. All rights reserved.