手 jiàn 将 blog 文件夹删除,重新搭建提示 4000 端口被占用
FATAL Port 4000 has been used. Try other port instead. FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/do Error: listen EADDRINUSE 0.0.0.0:4000 at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20)
网上找到解决办法是在_config.yml 加上代码更改 hexo-server 运行时的端口号,例如 4001
server: port: 4001 compress: true header: true
我其实心理上不愿意这样操作,想学习下如何清除之前的 4000 端口?( Ps 非程序员)
1 vakara 2020-06-16 15:16:12 +08:00 via Android ![]() lsof -i:4000 看具体的进程。 |
2 Jirajine 2020-06-16 15:18:28 +08:00 via Android 直接重启 |
![]() | 3 wellsc 2020-06-16 15:21:14 +08:00 字面意思已经告诉你了,4000 端口被占用了呢 |
![]() | 4 U7Q5tLAex2FI0o0g 2020-06-16 15:26:38 +08:00 你都知道“端口被占用”了,拿这 5 个字百度一下,详细的做法包括 windows 、linux 都会跟你说。 简单来说无非就是: 1 、找到占用端口的进程 2 、杀死进程(如果有需要的话) |