Curl: (6) could not resolve host – What’s wrong?
If you are using Linux, you are not too unfamiliar with Terminal, which is a software program that allows the user to communicate with the computer by running pre-installed commands. When you are trying to install a new application for using Terminal, you may get the error Curl: (6) could not resolve host.
If you are facing the error Curl: (6) could not resolve host, there may be 2 reasons for that. First of all, IPV6 was enabled. And another one is the wrong DNS server. So, if you are troubled because of one of the two reasons above, we will bring you the ways to disable IPV6 and add a Google DNS server to deal with this error. Let’s get started now!
How to fix Curl: (6) could not resolve host
As we mentioned above, the first solution we will show you is how to disable IPV6 to solve the error Curl: (6) could not resolve host. Here is the detailed instruction:
- Open Terminal -> Type su and enter in order to log in as the super user.
- Fill out the root password.
- Change the directory cd/etc/modprobe.d/ to /etc/modprobe.d/
- Type vi disableipv6.conf and generate a new file.
- Press the combination key Esc + I to insert data into the file you have already created.
- Enter install ipv6 /bin/true on the file in order to avoid loading modules related to IPV6.
- Type Esc + : -> Type wp to save and exit.
- Enter reboot to restart fedora -> Open terminal -> Type lsmod | grep ipv6
- Now, if there is no result, you succeed in disabling IPV6.
The second method to deal with this error Curl: (6) could not resolve host is to add Google DNS server. Let’s follow the steps below:
- Open Terminal -> Type su and enter in order to log in as the super user.
- Fill out the root password.
- In order to check what DNS server you are using, let’s type cat /etc/resolv.conf.
- An open DNS server maintained by Google can help you to address this trouble. They are 8.8.8.8 and 8.8.4.4 but they may change in the future. Learn more here.
- Enter vi /etc/resolv.conf in order to modify the file resolv.conf.
- Press the combination key Esc + I to insert data into the file.
- Insert # at the beginning of each line -> Fill out the two following lines in the file:
nameserver 8.8.8.8
nameserver 8.8.4.4
- Type Esc + : -> Type wp to save and exit.
Everything is done and you don’t need to restart. The error will disappear now!
Conclusion
To sum up, they are the two helpful solutions that are rated by many users. So, we hope that they will also support you to tackle the error Curl: (6) could not resolve host effectively. If you have any questions, please leave your comment below and we will answer you as soon as possible.
Furthermore, if you are finding some fast-loading speed, SEO-friendly and responsive free WordPress themes and Joomla 4 Templates, don’t hesitate to visit our site and explore the collection.
- How to place menu items in helix joomla 5 ? - December 14, 2024
- How to reduce the size of helix 2 layout ? - December 14, 2024
- What’s J4 starter template and how to use it - December 3, 2024
Recent Comments