-
[Mac]맥에서 사용중인 서버 끄기 (port kill)Python 2022. 11. 23. 00:08728x90반응형
Address already in use
Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port.
On macOS, try disabling the 'AirPlay Receiver' service from System Preferences -> Sharing.파이참 "Press CTRL+C to quit" 안될 때
실행중인 포트 찾기
lsof -i :포트번호
ex)
MacBookAir ~ % lsof -i :5000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME Python 36122 jeonhyejin 6u IPv4 0x5c72232b6bfdba41 0t0 TCP *:commplex-main (LISTEN) Python 36122 jeonhyejin 8u IPv4 0x5c72232b6bfdba41 0t0 TCP *:commplex-main (LISTEN) Python 61667 jeonhyejin 6u IPv4 0x5c72232b6bfdba41 0t0 TCP *:commplex-main (LISTEN) Python 61667 jeonhyejin 9u IPv4 0x5c72232b6bfdba41 0t0 TCP *:commplex-main (LISTEN)
포트 킬하기
kill -9 PID
ex)
MacBookAir ~ % kill -9 36122 MacBookAir ~ % kill -9 61667
728x90반응형'Python' 카테고리의 다른 글
Mac에서 Homebrew 설치 시 zsh: command not found 에러 (0) 2022.08.18