Error: That port is already in use.(Django项目无法启动)
Error: That port is already in use.说明端口号被占用
打开终端输入:
lsof -i:8000
然后可以看到
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
_Postman 24724 chenxin 134u IPv4 194944 0t0 TCP localhost:54114->localhost:8000 (ESTABLISHED)
python 26229 chenxin 4u IPv4 196787 0t0 TCP localhost:8000 (LISTEN)
使用
kill -9 24724
杀死进程就行