gpt4 book ai didi

macos - 我如何找出 macPorts 如何窃取我的端口 :80?

转载 作者:行者123 更新时间:2023-12-04 16:22:38 25 4
gpt4 key购买 nike

我安装了 MAMP(并且工作正常)然后我尝试通过 macPorts 安装 mongoDB。 macports 然后开始安装一堆依赖项。之后,http://localhost开始给出“它有效!”屏幕。重新启动以查看是否可以修复后,我发现无法启动 MAMP 服务器。控制台是这样说的:

9/13/10 1:20:54 PM  [0x0-0x12012].de.appsolute.MAMP[133]    (48)Address already in use: make_sock: could not bind to address [::]:80

我知道 macPorts 做了一些愚蠢的事情来惹我。我怎样才能找出它安装了什么窃取端口:80?

这是我尝试过的一些命令:(:80 不起作用,所以我只使用了 80)
$ sudo netstat -an | grep 80 
Password:
tcp46 0 0 *.80 *.* LISTEN
udp6 0 0 fe80::21e:52ff:f.123 *.*
udp6 0 0 fe80::1%lo0.123 *.*

和:
$ lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
firefox-b 451 biting_duck 39u IPv4 0x0ab806b0 0t0 TCP 192.168.0.198:49515->stackoverflow.com:http (ESTABLISHED)
firefox-b 451 biting_duck 40u IPv4 0x0ab87ec8 0t0 TCP 192.168.0.198:49517->sstatic.net:http (ESTABLISHED)
firefox-b 451 biting_duck 41u IPv4 0x0ab88aec 0t0 TCP 192.168.0.198:49516->pz-in-f95.1e100.net:http (ESTABLISHED)
firefox-b 451 biting_duck 42u IPv4 0x0ab97334 0t0 TCP 192.168.0.198:49518->sstatic.net:http (ESTABLISHED)
firefox-b 451 biting_duck 47u IPv4 0x0ab87abc 0t0 TCP 192.168.0.198:49519->sstatic.net:http (ESTABLISHED)
firefox-b 451 biting_duck 48u IPv4 0x0ab886e0 0t0 TCP 192.168.0.198:49520->sstatic.net:http (ESTABLISHED)
firefox-b 451 biting_duck 50u IPv4 0x0ab89b1c 0t0 TCP 192.168.0.198:49521->sstatic.net:http (ESTABLISHED)
firefox-b 451 biting_duck 51u IPv4 0x0ab86680 0t0 TCP 192.168.0.198:49522->peak-colo-196-216.peak.org:http (ESTABLISHED)
firefox-b 451 biting_duck 54u IPv4 0x0ab81ef8 0t0 TCP 192.168.0.198:49523->gravatar.com:http (ESTABLISHED)
firefox-b 451 biting_duck 55u IPv4 0x0ab82710 0t0 TCP 192.168.0.198:49524->gravatar.com:http (ESTABLISHED)
firefox-b 451 biting_duck 56u IPv4 0x0ab8a334 0t0 TCP 192.168.0.198:49526->64.34.80.176:http (ESTABLISHED)
firefox-b 451 biting_duck 57u IPv4 0x0ab812d4 0t0 TCP 192.168.0.198:49525->pv-in-f101.1e100.net:http (ESTABLISHED)

最佳答案

从您描述的关于启动错误和/private/etc/apache2/httpd.conf 的内容来看,听起来与基本操作系统一起安装的 Apache 副本已打开。检查系统偏好设置 -> 服务 -> Web 服务,并在需要时将其关闭。如果那里没有打开,请尝试:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

...如果这不起作用,请查看/Library/LaunchDaemons 以查看是否安装了其他启动 Apache (/usr/sbin/httpd) 系统副本的东西。

关于macos - 我如何找出 macPorts 如何窃取我的端口 :80?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3703751/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com