0

When I run the following command in the command prompt I get the following error

command "composer global require laravel/installer"

error "In CurlDownloader.php line 365:

curl error 7 while downloading https://repo.packagist.org/packages.json: Failed to connect to 127.0.0.1 port 8465 after 2044 ms: Connection refused"

I have tried the following solutions :

  • running Composer without SSL/TLS protection disabled but I got the same error
  • downloading the packages on github and then use it to develop laravel but that did not work either
  • turning off windows firewall
  • changing directories and even changing the command prompt to the xampp shell !

I mostly undid the changes after finding out that they aren't effective just need a way to Install laravel and become a software developer ;)

"composer diagnose " result :

composer diagnose

You are running Composer with SSL/TLS protection disabled. Checking platform settings: OK Checking git settings: OK git version 2.41.0 Checking http connectivity to packagist: FAIL [Composer\Downloader\TransportException] curl error 7 while downloading http://repo.packagist.org/packages.json: Failed to connect to 127.0.0.1 port 8465 after 2023 ms: Connection refused Checking https connectivity to packagist: FAIL [Composer\Downloader\TransportException] curl error 7 while downloading https://repo.packagist.org/packages.json: Failed to connect to 127.0.0.1 port 8465 after 2018 ms: Connection refused Composer is configured to disable SSL/TLS protection. This will leave remote HTTPS requests vulnerable to Man-In-The-Middle attacks. Checking HTTP proxy: FAIL [Composer\Downloader\TransportException] curl error 7 while downloading https://repo.packagist.org/packages.json: Failed to connect to 127.0.0.1 port 8465 after 2035 ms: Connection refused Checking github.com rate limit: FAIL [Composer\Downloader\TransportException] curl error 7 while downloading https://api.github.com/rate_limit: Failed to connect to 127.0.0.1 port 8465 after 2045 ms: Connection refused Checking disk free space: OK Checking pubkeys: Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642 Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952 OK Checking composer version: Warning: Accessing getcomposer.org over http which is an insecure protocol. FAIL [Composer\Downloader\TransportException] curl error 7 while downloading http://getcomposer.org/versions: Failed to connect to 127.0.0.1 port 8465 after 2044 ms: Connection refused Composer version: 2.6-dev+bbea3e5284fd859373c292c7f696f9647f9a59ef PHP version: 8.2.4 PHP binary path: C:\xampp\php\php.exe OpenSSL version: OpenSSL 3.0.8 7 Feb 2023 cURL version: 7.85.0 libz 1.2.12 ssl OpenSSL/3.0.8 zip: extension not loaded, unzip not available, 7-Zip not available

Amin Vzd
  • 1
  • 1
  • Can you try to run the command `composer diagnose` and share the outcome ? – Frederickcjo Jul 25 '23 at 11:04
  • hey ;) thanks for your help I shared a screenshot of the result in the post plz check it out ! – Amin Vzd Jul 25 '23 at 19:26
  • 1
    What happens if you visit https://repo.packagist.org/packages.json in your browser? What does `dig repo.packagist.org` show? – ceejayoz Jul 25 '23 at 19:53
  • 1
    Instead of a screenshot, provide the text. Reason: [Please do not upload images of code/data/errors.](//meta.stackoverflow.com/q/285551). And check your network configuration https://repo.packagist.org resolves to 127.0.0.1 port 8465. (same for https://api.github.com .) – hakre Jul 25 '23 at 19:53
  • Maybe you should disable your antivirüs and / or use an another DNS. – norahCii Jul 25 '23 at 21:37

0 Answers0