I’ve been trying to figure this out for a few days now and was hoping someone here could help me before I end up re-installing my OS and spending another 3 hours setting everything back up again.
I cannot, for the life of me, get sudo dnf update
to work for ANY repo, regardless of settings I’ve tried. dnf was working before a recent Fedora37 update, and now things seem to be broken.
Here’s an example of what the dnf error looks like:
Errors during downloading metadata for repository 'fedora':
- Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [Proxy CONNECT aborted due to timeout]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [Proxy CONNECT aborted due to timeout]
Here’s what I see in the dnf.log
file:
2023-01-27T11:59:13-0600 DEBUG error: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org] (https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64).
2023-01-27T11:59:13-0600 WARNING Errors during downloading metadata for repository 'fedora':
- Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]
2023-01-27T11:59:13-0600 DDEBUG Cleaning up.
2023-01-27T11:59:13-0600 SUBDEBUG
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/dnf/repo.py", line 573, in load
ret = self._repo.load()
^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/libdnf/repo.py", line 331, in load
return _repo.Repo_load(self)
^^^^^^^^^^^^^^^^^^^^^
libdnf._error.Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/dnf/cli/main.py", line 67, in main
return _main(base, args, cli_class, option_parser_class)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dnf/cli/main.py", line 106, in _main
return cli_run(cli, base)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dnf/cli/main.py", line 122, in cli_run
cli.run()
File "/usr/lib/python3.11/site-packages/dnf/cli/cli.py", line 1057, in run
return self.command.run()
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dnf/cli/commands/makecache.py", line 50, in run
return self.base.update_cache(timer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dnf/base.py", line 377, in update_cache
self.fill_sack(load_system_repo=False, load_available_repos=True) # performs the md sync
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dnf/base.py", line 406, in fill_sack
self._add_repo_to_sack(r)
File "/usr/lib/python3.11/site-packages/dnf/base.py", line 141, in _add_repo_to_sack
repo.load()
File "/usr/lib/python3.11/site-packages/dnf/repo.py", line 580, in load
raise dnf.exceptions.RepoError(str(e))
dnf.exceptions.RepoError: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]
2023-01-27T11:59:13-0600 CRITICAL Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]
I can run curl https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64
normally and I get a valid response, so it doesn’t seem like my proxies or certificates are messed up (although I’m on a corporate network with a proxy and certificates, so it’s possible):
curl https://mirrors.fedoraproject.org/metalink?repo=fedora-37&arch=x86_64
[1] 6636
[user@system log]$ <?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Fri, 27 Jan 2023 18:07:43 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
<!-- # either path=, or repo= and arch= must be specified
-->
</metalink>
I’ve tried a bunch of combinations of things for the dnf.conf file (proxy, ssl insecure, fastestmirror, zchunk). Nothing seems to make a difference. I’ve tried on different days, I’ve rebooted about 5 times, nothing.