Since yesterday DNF can no longer connect to any mirror to update or install anything. It throws Curl error 7 for all mirrors. Pinging mirrors.fedoraproject.org
also returns ping: connect: Network is unreachable
. As a result I’m not able to install or update any software. The following is the output of running sudo dnf update -v
. Any help is appreciated.
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync, system-upgrade DNF version: 4.6.1 cachedir: /var/cache/dnf User-Agent: constructed: ‘libdnf (Fedora 34; workstation; Linux.x86_64)’ repo: downloading from remote: fedora-cisco-openh264 error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64). Fedora 34 openh264 (From Cisco) — x86_64 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository ‘fedora-cisco-openh264’: — Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] Error: Failed to download metadata for repo ‘fedora-cisco-openh264’: Cannot prepare internal mirrorlist: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-34&arch=x86_64 [] repo: downloading from remote: fedora-modular countme: no event for fedora-modular: window already counted error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). error: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] (https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64). Fedora Modular 34 — x86_64 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository ‘fedora-modular’: — Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 [] Error: Failed to download metadata for repo ‘fedora-modular’: Cannot prepare internal mirrorlist: Curl error (7): Couldn’t connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64 []3:31 PM
Posted on Sunday, July 27, 2014 by nayana
After you installed Fedora, you may face this issue while updating the system or a any specific application. Any also while try to install new application using Terminal. There are few things you have to do to fedora before you start to work otherwise it will trouble you always.
Today I’m going to treat for these symptoms
1. curl: (6) Could not resolve host
2. curl: (6) Could not resolve host: google.com; Name or service not known
3. nolookup not working
4. Firefox doesn’t have internet
5. Couldn’t resolve host when installing/updating yum packages
6. Very Slow DNS Lookup
7. Very slow to load web pages in web browser.
Here is the step by step solution.
1. Most of the issues occur because of the IPV6 internet connection in the Fedora. So first we have to disable IPV6 totally. here what you have to do
- Open Terminal
- Type su and enter to log in as the super user
- Enter the root password
- Type cd /etc/modprobe.d/ to change directory to /etc/modprobe.d/
- Type vi disableipv6.conf to create a new file there
- Press Esc + i for insert data to file
- Type install ipv6 /bin/true on the file to avoid loading IPV6 related modules
- Type Esc + : and then wq for save and exit
- Type reboot to restart fedora
- After reboot open terminal and type lsmod | grep ipv6
- If no result, it means you properly disabled IPV6
2. Then you have to disable the IPV6 DNS look-up in your Firefox browser. For that you have to go true one of my step by step tutorial. below I mention the link. But remember to comeback here to continue rest of the tasks.
- Go to How to NO INTERNET IN THE FIREFOX AFTER INSTALLING FEDORA 20 Tutorial for fix the Firefox. this is not only for Fedora 20. works in most of the other versions too.
3. Now your Firefox ready t surf internet but one more issue there. Fedora may user your ADSL router or Modem as the DNS server. In other way Fedora may uses some less powerful DNS server for look-up. So your DNS look-up will be slow and wrong most of the time. This will cause to Curl errors and slow loading errors. So we have to set some powerful DNS server for look-up purpose in Fedora. Here is the steps.
- Open Terminal
- Type su and enter to log in as the super user
- Enter the root password
- Type cat /etc/resolv.conf to check what DNS server your Fedora using. Mostly this will be your Modem IP address.
- Now we have to Find a powerful DNS server. Luckily there is a open DNS server maintain by Google.
- Go to this page and find out what are the «Google Public DNS IP addresses»
- Today those are 8.8.8.8 and 8.8.4.4. But in future those may change.
- Type vi /etc/resolv.conf to edit the resolv.conf file
- Press Esc + i for insert data to file
- Comment all the things in the file by inserting # at the begin of the each line. Do not delete anything because can be useful in future.
- Type below two lines in the file
nameserver 8.8.8.8 nameserver 8.8.4.4
- Type Esc + : and then wq for save and exit
- Now you are done and everything works fine (Not necessary to restart).
- But every time when you restart the computer your /etc/resolv.conf will be replaced by default. So I’m let you find a way to avoid that.
As Linux users continue to skillfully nurture and grow their user experience, they soon realize that they become more performant and productive while in the Linux command-line environment.
The Linux OS environment exposes its users to terminal-based tools like Curl for a non-interactive download and upload of targeted network/internet-based files, which is similar to the Wget utility and both share some similarities in their implementation and functionalities.
The primary role of the Curl utility as highlighted on its manual page is to transfer a targeted URL.
$ man curl
It supports numerous protocols with the common ones being FTP, FTPS, HTTP, HTTPS, SCP, SFTP, SMTP, and SMTP.
The Curl command syntax is as follows:
$ curl [options / URLs]
We can show its implementation by using it with a random URL.
$ curl https://google.com -o linuxshelltips.txt
In the above command, Curl’s findings from accessing the highlighted URL are saved in the succeeding text file.
curl: (6) could not resolve host Error
Mostly, such an error occurs when there is an issue with a Linux server’s DNS resolver. A Linux administrator will categorize/define this challenge as a server management service issue.
This error is likely to take several forms when the curl command is executed from the Linux terminal and the most popular ones include:
- curl: (6) could not resolve host: domain_name.extension; Name or service not known
- curl: (6) could not resolve host: domain_name.extension e.g. linuxshelltips.com
- curl: (6) could not resolve host: application
Now that we have highlighted the primary reason that might be behind the stated curl command error during its execution on a Linux terminal, it’s time to fix the problem.
Solution 1: Missing Working DNS Nameserver
A nameserver is basically a bridge between a working/purchased domain name and the IP address of a server. When you purchase or subscribe to a domain name, and before you use/link this domain name to your remote Linux server, you need to configure a DNS nameserver. A DNS nameserver enables a user to use a domain name to access a remote server instead of using its IP address.
On your Linux server/machine, the file /etc/resolv.conf is responsible for the DNS nameserver entries auto-generated by NetworkManager.
$ sudo nano /etc/resolv.conf
This file can hold more than one DNS nameserver entry. As you might have noted, the syntax for adding a DNS nameserver entry in this file should resemble the following:
nameserver IP.ADDRESS
For instance, if you were to add Google public nameservers to this file, it would look like the following:
nameserver 192.168.100.1 nameserver 8.8.8.8 nameserver 8.8.4.4
If you are using a private DNS nameserver, add it to the /etc/resolv.conf file. Update or reboot the system if possible and the host should start resolving.
Solution 2: Curl Syntax Errors
Make sure the curl command execution adheres to its correct syntax usage. A syntax error can arise from something as simple as the misuse of an escape sequence (/)
or an illegal spacing on the URL.
The curl: (6) could not resolve host error in Linux primarily relates to wrongful/missing DNS nameserver setup or a random syntax error that can be scanned and fixed.
Using curl on a clean vanilla Fedora 21 to retrieve a site hosted via the cloudflare https service gives an error:
curl https://www.opencpu.org
>> curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).
Also:
curl https://www.cloudflare.org
>> curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
This problem only appears on Fedora, not on Ubuntu or Mac running the same version of curl. I suppose it must be related to nns then:
curl --version
>> curl 7.37.0 (x86_64-redhat-linux-gnu) libcurl/7.37.0 NSS/3.17.3 Basic ECC zlib/1.2.8 libidn/1.28 libssh2/1.4.3
certutil -L
>> certutil: function failed: SEC_ERROR_LEGACY_DATABASE: The certificate/key database is in an old, unsupported format.
Any guess to what I am doing wrong?
asked Jan 25, 2015 at 5:14
1
The common factor with both of these sites is that they use ECC SSL certificates to secure their https connections, rather than the traditional RSA certificates used by most sites. These are currently very rare, but they are expected to increase in popularity in the future.
Both the versions of curl and NSS in use were built with ECC and therefore ought to support these certificates, so I think you’ve run into a bug in Fedora and should report it. A related bug was recently fixed in RHEL 7.
As a workaround, you can use wget
instead of curl
, which has no problem connecting to these sites (though the latter returns a 409 Conflict error).
answered Jan 25, 2015 at 5:46
Michael HamptonMichael Hampton
240k42 gold badges489 silver badges954 bronze badges
Please try
bash
yum update nss
answered Aug 30, 2016 at 6:13
1