我通常是 Debian/Ubuntu 的人,但我想在 CentOS 7 上测试 foreman,但我在使用rpm
命令时遇到了一些问题。我尝试过禁用 IPV6
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
sysctl -p
但似乎没有什么作用?
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
Retrieving http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
curl: (7) Failed to connect to 2600:3c03::f03c:91ff:fedb:6b1d: Network is unreachable
error: skipping http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm - transfer failed
答案1
(通常的警告是关于不要禁用 IPV6适用...)
这很奇怪,因为有问题的 IPv6 地址位于某个 Linode,而 yum.puppetlabs.com 是(据我所知当时)通过 Amazon CloudFront 分发的,并且没有 IPv6 地址。
$ host yum.puppetlabs.com
yum.puppetlabs.com is an alias for yum.puppet.com.
yum.puppet.com is an alias for d1ge15oq8tiwk1.cloudfront.net.
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.130
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.43
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.18
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.56
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.168
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.60
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.238
d1ge15oq8tiwk1.cloudfront.net has address 13.33.115.162
我怀疑当您的系统尝试执行此名称解析时,您的本地设置向您提供了无效的地址。这很可能是/etc/hosts
文件中的某些内容或可能是恶意(或配置错误)的 DNS 服务器。