Curl - 无法解析适用于 Windows 10 的 Ubuntu 上的主机,但可以在 Windows 10 上运行

Curl - 无法解析适用于 Windows 10 的 Ubuntu 上的主机,但可以在 Windows 10 上运行

我在 Windows 10 上的 Ubuntu 上运行 bash shell。我最近配置了一台新笔记本电脑,现在发现无法使用 curl 检索 URL。

但是,与在 Windows 10 上运行 ubuntu bash 相比,curl 直接在 Windows Shell 上运行时可以工作。

此外,wget 还适用于 Windows 版 ubuntu。见下文。

root@ionwuka2go2:/mnt/c/home/oneD/translator# curl https://basex.org
curl: (6) Could not resolve host: basex.org
root@ionwuka2go2:/mnt/c/home/oneD/translator# wget --spider https://basex.org
Spider mode enabled. Check if remote file exists.
--2021-02-13 09:23:33--  https://basex.org/
Resolving basex.org (basex.org)... 185.221.106.187
Connecting to basex.org (basex.org)|185.221.106.187|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14364 (14K) [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.

答案1

已解决。由运行反恶意软件引起。请参阅下面的消息。

BitDefender 生成此消息:程序被拒绝连接到 Internet。进程路径 /usr/bin/curl。协议 UDP (17)。端口 53。

我的临时解决方法是卸载它(我无法暂时禁用它)直到我们的系统管理员可以查看它。

相关内容