1

I have problem with DNS resolving in my WSL1, here is the example:

[rootname@hostname ~]# yum update
CentOS Stream 8 - AppStream                                                             0.0  B/s |   0  B     00:00
Errors during downloading metadata for repository 'appstream':
  - Curl error (6): Couldn't resolve host name for https://vault.centos.org/centos/8-stream/AppStream/x86_64/os/repodata/repomd.xml [Could not resolve host: vault.centos.org]
Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Ping to vault.centos.org returns:

64 bytes from server-18-66-27-78.vie50.r.cloudfront.net (18.66.27.78): icmp_seq=4 ttl=246 time=54.6 ms

curl -G www.example.net returns content of html:

<html>
<<ANY_CONTENT>>
<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents. You may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>

Where is problem of this Error, when DNS resolving de-facto works? How solve it? Thanks

Fila
  • 21

2 Answers2

1

Friend, I was told that this is due to the end of support for Centos repositories of older versions

I found this way to fix it. Just run these three commands and your repositories will be updated. This is true for Centos-7 and Centos-8

sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo

sed -i s/^#.baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-.repo

sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo

1

Solved, after reading yum executable. yum is not elf executable, but script. Fire wall blocks another application, that's base.

Fila
  • 21