composer laravel install: “http://packagist.org” file could not be downloaded - laravel

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

Related

how can i solve this laravel project installation problem?

When I try to install a new project in my htdocs folder in that time i get this error:
[Composer\Repository\InvalidRepositoryException] Invalid repository
data in C:\xampp\htdocs/vendor/composer/installed.json, packages could
not be loaded: [Seld\Json Lint\ParsingException]
"C:\xampp\htdocs/vendor/composer/installed.json" does not contain
valid JSON Parse error on line 1:
\\\\\\\\\\ ^ Expected one of: 'STRING', 'NUMBER', 'NULL',
'TRUE', 'FALSE', '{', '['
My installation command is:
composer create-project --prefer-dist laravel/laravel CruiseBag "5.6.*"
Install Laravel on Windows
Download Composer’s Windows .exe installer:
https://getcomposer.org/download/
Run the installer
Open Window’s CMD or PowerShell
cd C:\xampp\htdocs
Install Laravel using Composer
composer create-project --prefer-dist laravel/laravel CruiseBag "5.6"
See
// first composer download, then composer install
// Or command use:
composer global require "laravel/installer"
//then
composer create-project --prefer-dist laravel/laravel blog "5.6.*"

Installing Laravel gives Error

I try to install Laravel 5.4 in windows 10 but during the installation it gives this error :
The "https://getcomposer.org/versions" file could not be downloaded:
php_network_getaddresses: getaddrinfo failed: Hôte inconnu. failed to
open stream: php_network_getaddresses: getaddrinfo failed: Hôte
inconnu.
open the terminal (Win + R) and run composer check if it works or not ?
if it works then you have to refresh the web server by running this command .
sudo /etc/init.d/apache2 restart OR sudo /etc/init.d/apache restart
else install the composer once again . Watch here
then run this command for installing laravel
composer create-project --prefer-dist laravel/laravel blog "5.4.*"

installation of composer on shared hosting

I have installed composer on shared hosting.
It's successfully installed on my shared hosting.
I have followed this tutorial for installation.
Link :- https://www.globo.tech/learning-center/laravel-under-cpanel/
Screenshot after installation.
I have used below command and it's working fine for me.
php composer.phar
But when I tried to install laravel in my public_html directory using below command,
composer create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
It's not working. It shows composer command not please find below screenshot for error.
Please let me know what I'm missing while installing composer.
Use the command php composer.phar create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
and make sure you execute the command from the directory where compser.phar exists.

Installing Laravel 5 on CentOS

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

Create Laravel project with composer not working

I installed with success composer.phar in my computer but when I try to create a Laravel project with composer I have this error "exportnot open input file: path". Here you can see a print of terminal:
How can I fix it?
Try it like this:
php composer.phar create-project laravel/laravel IsabellProgetto
Try like this:
composer create-project --prefer-dist laravel/laravel your-project-name "5.2.*"
composer create-project laravel/laravel newproject

Resources