I was trying to install Laravel at work and I could not do it, I know there might be a proxy problem because there some restrictions but I am not sure, this is the error message I get when I run the install on terminal
I run this command
composer create-project --prefer-dist laravel/laravel testproject
and I got this error message
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Operation timed out
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: No route to host
any ideas?
thanks
I found the slution!
is by adding the proxy at the beginning of the command like this
HTTP_PROXY="http;//yourproxy.something" composer create-project
--prefer-dist laravel/laravel testproject
est voila, it works :D
Related
After Laravel released new version (5.7) of this framework, i cant create new project and its commands not work
i did this works:
1) use laravel new MyProject with this error :
[GuzzleHttp\Exception\RequestException] Error creating resource: [message]
fopen(http://cabinet.laravel.com/latest.zip): failed to open stream: A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond.[file]
C:\Users\Saeid\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\
Handler\StreamHandler.php[line] 324
2) use composer create-project --prefer-dist laravel/laravel MyProject with this error :
[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
3) update composer by composer selfupdate with this error :
[Composer\Downloader\TransportException] The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
4) update laravel instller by composer global require "laravel/installer"
[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
Notice: in all of steps all links work on google chrome!!!! but it said "No connection could be made because the target machine actively refused it."
Notice: my composer version (1.7.2)
Notice: my Laravel installer version is (2.0.1)
Finally I found the problem ...
that's "Composer Proxy Setting"
because damned Filtering in Iran we must use proxy based programs for bypass the filtering.
last time i installed the composer the proxy based anti filter app (freegate) was running and composer get the local proxy address "127.0.0.1:8580" and all of the problems started...
today when the freegate was running i saw everything is OK!!!
some body know how to change the composer proxy setting???
i removed the composer and install it again but the installer automatically use this proxy address and disable the checkbox that use to select the proxy setting.
that means i cant disable proxy setting or change it.... :(
first download the composer the open your IDE the execute composer create-project "laravel/laravel" project-name
I have a problem with composer.
when I want install a php package with composer on my project, I see this mess :
You are running Composer with SSL/TLS protection disabled.
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be
downloaded: fai led to open stream: Connection refused
please help me ...
how can i ok this problem ?
Thanks in advance
I have been trying to install Laravel (Latest version) on my Mac machine. I have all prerequisites such as php, composer. Just tried to execute below commands but it is giving errors.
/Applications/XAMPP/xamppfiles/bin/php composer.phar create-project laravel/laravel {directory} 4.2 --prefer-dist
Where,
-- /Applications/XAMPP/xamppfiles/bin/php - Mac php path
-- composer.phar - Composer file
After executing the above command, I am getting error like below. I am using my office network, could that cause a firewall issue?
Error:
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
About my Mac:
OS X EI Captain (Version 10.11.6)
In this case my suggestion is using Laravel Valet - never had issues with it. It will save you tones of time after you will start using it.
https://laravel.com/docs/5.4/valet
Also try to use global composer and clean composer's cache before doing that.
I think it was temporary issue.
I used this command to create a new laravel project in the homestead:
composer create-project laravel/laravel Laravel
Then, the terminal show this error:
Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel/zipball/7bddbdc2a1f8d9c23205707e74455d74684e3031" file could not be downloaded: failed to open stream: Connection timed out
Now trying to download from source
I used curl command to get the content, failed again:
curl https://api.github.com/repos/laravel/laravel/zipball/7bddbdc2a1f8d9c23205707e74455d74684e3031
However, when I enter the address in the broswer(Firefox), it work! I can download the file by the browser!
Any help is greatly appreciated.
This is probably the common issue about the reliability of the github downloads. It fails regularly.
A workaround is to increase COMPOSER_PROCESS_TIMEOUT (defaults to 300) and force installing from source with the --prefer-source option:
COMPOSER_PROCESS_TIMEOUT=2000
composer create-project laravel/laravel Laravel --prefer-source
I was trying use command composer create-project laravel/laravel Laravel, to create a new laravel project.
But I got this in the terminal:
Failed to download jakub-onderka/php-console-color from dist: The "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1" file could not be downloaded: failed to open stream: Connection timed out
Now trying to download from source
Then, I tried this command:
curl https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1
It cannot work.
However, when I entered the address in the browser(FireFox), It works!
What's wrong with that? Have suffered from this couple of days.