I am currently using Kali Linux 2022.3, PHP version 8.1.5 and Composer version 2.4.2.
I am trying to create a Laravel Project using.
composer create-project laravel/laravel example-app
But It kept failing. The error is.
https://repo.packagist.org could not be fully loaded (The "https://repo.packagist.org/p2/laravel/laravel.json" file could not be downloaded: php_network_getaddresses: getaddrinfo for repo.packagist.org failed: Temporary failure in name resolution
Failed to open stream: php_network_getaddresses: getaddrinfo for repo.packagist.org failed: Temporary failure in name resolution), package information was loaded from the local cache and may be out of date.
How do I solve this? I am very new to Kali Linux and not even sure what is causing the error. At first I thought it's connection problem so I tried with VPN and also tried a couple of possible solution but nothing seem to be working.Still the same problem.