Mac端口5000被ControlCe占用问题解决方法

问题
Mac上运行flask应用时提示端口5000已被占用。

查看占用情况:

$ lsof -i:5000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ControlCe 70052 jiaqi 24u IPv4 0xa620acf2cebbe09f 0t0 TCP *:commplex-main (LISTEN)
ControlCe 70052 jiaqi 25u IPv6 0xa620acf2d26d27a7 0t0 TCP *:commplex-main (LISTEN)

显示进程ControlCe在占用5000端口,这是系统进程Control Center,把它kill掉还是会自动启动起来。

解决方法
在系统设置里关掉 “Sharing - AirPlay Receiver”即可:

posted @ 2021-12-09 09:53  技术改变命运Andy  阅读(302)  评论(0编辑  收藏  举报