无法绑定到 127.0.0.1:9050:地址已被使用。Tor 是否已在运行?

无法绑定到 127.0.0.1:9050:地址已被使用。Tor 是否已在运行?

我是这样安装 Tor 的:

sudo add-apt-repository ppa:webupd8team/tor-browser
sudo apt-get update
sudo apt-get install tor-browser

我今天在终端中运行这个:$ tor然后收到此错误消息:

Oct 04 19:24:04.461 [notice] Tor v0.2.7.6 (git-605ae665009853bd) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.2g and Zlib 1.2.8.
Oct 04 19:24:04.461 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Oct 04 19:24:04.517 [notice] Read configuration file "/etc/tor/torrc".
Oct 04 19:24:04.574 [notice] Opening Socks listener on 127.0.0.1:9050
Oct 04 19:24:04.574 [warn] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running?
Oct 04 19:24:04.575 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Oct 04 19:24:04.575 [err] Reading config failed--see warnings above.

如何解决这个问题?

答案1

对我有用的是:

killall tor

答案2

netstat将告诉您该端口上正在监听的内容。打开终端(按++ Ctrl),然后运行:AltT

sudo netstat -plnt | fgrep 9050

它会告诉你哪个程序正在使用该端口。例如,在我的系统上,它显示:

tcp       0     0 127.0.0.1:9050         0.0.0.0:*              LISTEN     1198/tor

最后,它说监听该端口的程序是tor

答案3

@David Foerster 的回答:killall tor对我不起作用。
我得到了结果tor: no process found.

新解决方案:sudo killall tor

答案4

重新启动设备并再次运行。端口将会真实。

相关内容