I was installing laravel framework by composer in visual studio code.
composer create-project laravel/laravel ems
but it failed to install the laravel.
here is the message
$ composer create-project laravel/laravel ems
Installing laravel/laravel (v5.5.0)
- Installing laravel/laravel (v5.5.0): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel
/zipball/a6c68c24c9938beef0128c3288502b8fbdf8e93d" file could not be downloaded: failed to open stream: A connection at
tempt failed because the connected party did not properly respond after a period of time, or established connection fai
led because connected host has failed to respond.
Now trying to download from source
- Installing laravel/laravel (v5.5.0): Cloning a6c68c24c9 from cache
[RuntimeException]
Failed to clone https://github.com/laravel/laravel.git via https, ssh protocols, aborting.
- https://github.com/laravel/laravel.git
Cloning into 'C:\xampp\htdocs\ems'...
fatal: unable to access 'https://github.com/laravel/laravel.git/': Failed to connect to github.com port 443: Tim
ed out
- git#github.com:laravel/laravel.git
Cloning into 'C:\xampp\htdocs\ems'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url
REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-
vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
I think you miss something "--prefer-dist"
composer create-project --prefer-dist laravel/laravel projectName
look at the documentation https://laravel.com/docs/5.5
Related
Kindly help me, I am new in Laravel framework
When I run my laravel project, it display error
[Class 'Oureastudios\Laravel\BraintreeServiceProvider' not found].
I also try and load through composer but composer not download and give error.
composer require oureastudios/laravel5-braintree:dev-master --prefer-dist
You are running Composer with SSL/TLS protection disabled.
./composer.json has been updated Loading composer repositories with
package information Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing oureastudios/laravel5-braintree (dev-master 16ebcc6): Downloading (failed) Failed to download
oureastudios/laravel5-braintree from dist: The
"https://api.github.com/repos/oureastudios/laravel5-braintree/zipball/16ebcc610d9d0efef8a4ec28c19c8123586f10c2"
file could not be downloaded (HTTP/1.1 404 Not Found)
Now trying to download from source
- Installing oureastudios/laravel5-braintree (dev-master 16ebcc6): Cloning 16ebcc610d
Installation failed, reverting ./composer.json to its original
content.
[RuntimeException] Failed to clone
https://github.com/oureastudios/laravel5-braintree.git, git was not
found, check that it is install ed and in your PATH env.
'git' is not recognized as an internal or external command,
operable program or batch file.
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress]
[--no-suggest] [--no-update] [--no-scripts] [--update-no-dev]
[--update-with-dependencies] [--update-with-all-dependencies]
[--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest]
[--sort-packages] [-o|--optimize-autoloader]
[-a|--classmap-authoritative] [--apcu-autoloader] [--] []...
Thanks in advance.
that repository doesnt exist anymore.
try this one instead
https://github.com/odannyc/laravel5-braintree
composer require odannyc/laravel5-braintree:dev-master --prefer-dist
Installing laravel/laravel (v5.7.13)
- Installing laravel/laravel (v5.7.13): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel/zipball/c09519f547ae7a97eb26433f159cd81b8753e666" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing laravel/laravel (v5.7.13): Cloning c09519f547
[RuntimeException]
Failed to clone https://github.com/laravel/laravel.git, git was not found, check that it is installed and in your P
ATH env.
'git' is not recognized as an internal or external command,
operable program or batch file.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
I'm trying to install laravel 5.7 by using this command
> composer create-project --prefer-dist laravel/laravel new_project dev-develop
But it's reflecting following error, also i disabled antivirus and firewall.
Installing laravel/laravel (dev-develop
b0651d2467f1428eadc505e1b3b4f5678611927c)
- Installing laravel/laravel (dev-develop develop): Loading from cache Created project in new_project
#php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating
dependencies (including require-dev) Package operations: 71 installs,
0 updates, 0 removals
- Installing vlucas/phpdotenv (v2.5.1): Downloading (failed) Downloading (failed) Downloading (failed) Failed to download
vlucas/phpdotenv from dist: The
"https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e"
file could not be downloaded : SSL operation failed with code 1.
OpenSSL Error messages: error:1416F086:SSL
routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto failed to open stream: operation failed
Now trying to download from source
- Installing vlucas/phpdotenv (v2.5.1): Cloning 8abb4f9aa8
[RuntimeException] Failed to clone
https://github.com/vlucas/phpdotenv.git via https,ssh protocols,
aborting.
- https,ssh://github.com/vlucas/phpdotenv.git
Cloning into 'D:\xamppro\htdocs\neologicx.com\new_project\vendor\vlucas\phpdotenv'...
fatal: I don't handle protocol 'https,ssh'
create-project [-s|--stability STABILITY] [--prefer-source]
[--prefer-dist] [--repository REPOSITORY] [--repository-url
REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers]
[--no-scripts] [--no
-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
OpenSSL Installed
and enabled
Okay, my problem resolved by removing '%temp%' files from windows.
After that i got content-length mismatch problem resolved from this Composer Content-Length Mismatch
And then again i tried this "composer create-project laravel/laravel laravelproject1" it worked.
Thanks Alot everyone.
composer global require "laravel/installer"
--
laravel new myProject
Run these commands in order and you should be fine.
If you prefer to use the composer create project command, then run this:
composer create-project --prefer-dist laravel/laravel blog
try composer clear-cache then composer self-update
Please try this.
install laravel 5.7:
composer create-project laravel/laravel laravelproject1
On running the command:
composer create-project --prefer-dist laravel/laravel blog
I am getting these errors -
Your version of PHP, 5.4.12, is affected by CVE-2013-6420 and cannot safely perform
certificate validation, we strongly suggest you upgrade.
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded:
SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
create-project [-s|--stability STABILITY] [--prefer-source]
[--prefer-dist] [--repository REPOSITORY] [--repository-url
REPOSITORY-URL] [--dev] [--no-dev] [--no-plugins]
[--no-custom-installers] [--no-scripts] [--noprogress] [--keep-vcs]
[--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>][<version>]
Can anyone please tell me what may be the problem. I am using a proxy network. In environment variable I have set both http_proxy & https_proxy.
For laravel 5.2 minimum version of php required is 5.5.9
So you have to upgrade your php version.
Also you need to have only http_proxy as system variable if you are using proxy network, not the https_proxy variable.
I have composer installed and openSSL extension enable in PHP but I still get the error (I restarted wamp twice)
Afflicto#Afflicto-PC /cygdrive/e/wamp/www/wirezapp2
$ composer create-project laravel/laravel wirezapp --prefer-dist
Installing laravel/laravel (v4.0.5)
- Installing laravel/laravel (v4.0.5)
Downloading: 100%
Downloading: 100%
Downloading: 100%
[Composer\Downloader\TransportException]
The "http://nodeload.github.com/laravel/laravel/zip/v4.0.5" file could not
be downloaded: failed to open stream: Unable to find the socket transport "
ssl" - did you forget to enable it when you configured PHP?
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-
url="..."] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress]
[-- keep-vcs] [package] [directory] [version]
Figured it out:
The php.ini in wamp is different than that used by apache/wamp, so I had to enable the open ssl extension via php.ini found in wamp/bin/php/php5.4.3/php.ini