0

I use ubuntu 20.04 when I run composer require stevebauman/location in laravel project I get the following error

You are running Composer with SSL/TLS protection disabled.
https://repo.packagist.org could not be fully loaded (curl error 5 while downloading https://repo.packagist.org/packages.json: Could not resolve proxy: my.proxyserver.net), package information was loaded from the local cache and may be out of date

In CurlDownloader.php line 377:
                                                                                                                                       
  curl error 5 while downloading https://repo.packagist.org/p2/stevebauman/location.json: Could not resolve proxy: my.proxyserver.net  
                                                                                                                                       

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

I connected to the internet on my mobile and then ran this command again I get the flowing error

You are running Composer with SSL/TLS protection disabled.
https://repo.packagist.org could not be fully loaded (curl error 7 while downloading https://repo.packagist.org/packages.json: Failed to connect to my.proxyserver.net port 8080: Connection refused), package information was loaded from the local cache and may be out of date

In CurlDownloader.php line 377:
                                                                                                                                                                     
  curl error 7 while downloading https://repo.packagist.org/p2/stevebauman/location~dev.json: Failed to connect to my.proxyserver.net port 8080: Connection refused  
                                                                                                                                                                     

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

how can I fix this error?? pleas help me!

1 Answers1

0

It seems composer wants to use a proxy server for the connection that is not available on the network. Looking at this question on setting a proxy server for composer, look at your system environment variables for a variable http_proxy and note it's value for restore if needed.

Then clear the variable:

$ unset http_proxy

To restore:

$ export http_proxy=<YOUR_ORIGINAL_VALUE>
Roderick Bant
  • 1,534
  • 1
  • 9
  • 17