【发布时间】:2020-08-06 08:26:29
【问题描述】:
Yum 无法从具有 IPv6 地址的存储库中检索软件包:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<p>Additionally, a 400 Bad Request
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
使用 curl 可以重现该问题。
使用 curl,一种解决方法是添加 --globoff 参数。
但是似乎没有任何明显的方法可以使用 yum 来做到这一点。
Yum 没有--globoff 参数,也没有任何明显的方法可以将任意参数传递给 curl。
显然,最近版本的 yum (https://bugzilla.redhat.com/show_bug.cgi?id=1076277) 中有一个 bug 修复,可以在调用 curl 时自动添加 globoff 参数,但由于某种原因,这里似乎没有发生(可能我的 yum 版本是只是有点太旧了。但即使这样可行,升级 yum 也不是一个理想的选择,原因有很多)。
【问题讨论】: