所使用命令的含义 lsof - list open files 查看指定的端口号 // 为了避免权限问题, 建议前面加上`sudo` lsof -i tcp:<端口号> 杀掉占用指定端口的进程 sudo kill -9 <进程的PID>