it hangs on the loading packages, the error below.
$ composer create-project laravel/laravel jobs
Creating a "laravel/laravel" project at "./jobs"
Installing laravel/laravel (v9.2.0)
Installing laravel/laravel (v9.2.0): Extracting archive
Created project in C:\xampp\htdocs\jobs
#php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Related
ayat#ayat-Win MINGW64 /c/xampp/htdocs/laravel $ composer
create-project --prefer-dist laravel/laravel cms Creating a
"laravel/laravel" project at "./cms" Installing laravel/laravel
(v7.12.0)
Installing laravel/laravel (v7.12.0): Loading from cache Created project in C:\xampp\htdocs\laravel\cms #php -r "file_exists('.env')
|| copy('.env.example', '.env');" Loading composer repositories with
package information Updating dependencies (including require-dev)
Package operations: 99 installs, 0 updates, 0 removals
Installing voku/portable-ascii (1.5.2): Loading from cache
Installing symfony/polyfill-ctype (v1.18.0): Loading from cache - Installing phpoption/phpoption (1.7.5): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download phpoption/phpoption from dist: The
"https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525"
file could not be downloaded: 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.
Now trying to download from source
I want to install laravel through composer with :
$ composer create-project --prefer-dist laravel/laravel DemoTest
but every time i do that composer shows a message:
[Composer\Downloader\TransportException] The
"http://packagist.org/p/provider-2013%244440cd3f9b7aec0de3e4f3486e61b7e348d74d03a0bd6a61b5b8a514e105
2c4d.json" file could not be downloaded: failed to open stream: HTTP
request failed!
Can you try
composer clear-cache
then
composer -vvv
after that try running the install command for laravel, it worked for me though
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
I'm trying to install larvel 5 on my vps(the os is centos) and when I run the command
php composer.phar create-project laravel/laravel --prefer-dist
I get this result
Installing laravel/laravel (v5.0.22)
- Installing laravel/laravel (v5.0.22)
Loading from cache
then it's stop !
Not sure why your cache is failing, but did you try using source instead of distr?
php composer.phar create-project laravel/laravel --prefer-source
Anyone can tell me the difference between this commands
composer create-project laravel/laravel your-project-name --prefer-dist
composer create-project laravel/laravel your-project-name
composer create-project laravel/laravel your-project-name -dev
From the documentation for composer:
--prefer-dist: Reverse of --prefer-source, composer will install from dist if possible. This can speed up installs substantially on build servers and other use cases where you typically do not run updates of the vendors. It is also a way to circumvent problems with git if you do not have a proper setup.
That means Composer will install the dependencies from the distribution build, instead of the sources.
And for the --dev flag:
--dev: Install packages listed in require-dev.
That means Composer will also install all package dependencies list in require-dev key from your composer.json. The require-dev key are dependences only required for development.
Please, for more information, read the docs regarding Composer CLI: https://getcomposer.org/doc/03-cli.md#create-project