Error with Symfony Flex: You have misconfigured DNS resolver(s)

13.2k Views Asked by At

When I run the command composer install or composer update it shows me the following

The following exception probably indicates you have misconfigured DNS resolver(s)
                                                                                                                
  [Composer\Downloader\TransportException]                                                                         
  curl error 6 while downloading https://flex.symfony.com/versions.json: Could not resolve host: flex.symfony.com`

I changed DNS but that did not fix the problem.

PHP version : 8.0.0. I test with php version 7.4

1

There are 1 best solutions below

2
On

Old Flex infrastructure is being shut down, you need to update Flex to AT LEAST 1.17.1. To do that, you need to run:

composer update symfony/flex --no-plugins --no-scripts

source: https://symfony.com/blog/upgrade-flex-on-your-symfony-projects