Display error when i try to composer install - laravel

I have one laravel5.0 project
I want to run this project in my local system
But when i run command into cmd "composer install"
that time my cmd display following error message
C:\xampp\htdocs\Laravel5>composer install
> php artisan clear-compiled
Warning: require(C:\xampp\htdocs\Laravel5\bootstrap/../vendor/autoload.php): fai
led to open stream: No such file or directory in C:\xampp\htdocs\Laravel5\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\Laravel5\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htd
ocs\Laravel5\bootstrap\autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output:
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

just run this command
composer update --no-scripts
It will run composer without any scripts.

Related

Error installing Laravel: [ErrorException] file_get_contents(): read of 8192 bytes failed

This is the error:
Generating optimized autoload files
...
[ErrorException]
file_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [] [] [<version
...
This is usually a cache problem with composer. Either you have a slow connection (like me) or a process was interrupted during install/update.
Run composer clear-cache and try again. I hope this solves your problem.
Which PHP version are you using? cause this was a bug in PHP 7.4 as stated here :
https://bugs.php.net/bug.php?id=79166
Try using PHP 7.3, it should work fine

Unable to install laravel using composer "composer create-project --prefer-dist laravel/laravel blog"

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] [--] [] [] []

Installation errors in Laravel using composer

i have installed composer using composer-setup.exe
then after i am trying to install laravel from cmd using composer.
my cmd command are like:
"F:\Websites>composer create-project laravel/laravel l5"
and it gives me error like :
[ErrorException]
chmod(): No such file or directory
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 am using create-project command with composer
i think you are missing something there..
try this and you are good to go..
composer create-project --prefer-dist laravel/laravel yourDirectory
its from official documentation

laravel installation failure with Composer

I was following a tutorial on Lynda.com, and I am completely new to the composer/laravel scene. The tutorial told me to install the MCrypt libarary, which I did successfully from this package:
topicdesk.com/downloads/mcrypt/mcrypt-download
Composer seems to be successfully installed/running.
I then went ahead and opened terminal, and put in the following command:
composer create-project laravel/laravel first_app --prefer-dist
Which resulted in the following error:
Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
create-project [-s|--stability="..."] [--prefer-source]
[--prefer-dist] [--repository-url="..."]
[--dev] [--no-dev] [--no-plugins]
[--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs]
[--no-install] [package] [directory] [version]
Any ideas on what the issue may be? After looking around on the forums, it seems to me that it is a very case specific issue. Where do I begin in finding what may be preventing it from working correctly?

Can't install Laravel4

I try to install Laravel4 on windows 8.
I download the file, unzip it, and call "composer update"
then i have these messages :
PHP Warning: require(D:\sites\lara\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\sites\lara\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP 1. {main}() D:\sites\lara\artisan:0
PHP 2. require() D:\sites\lara\artisan:16
PHP Fatal error: require(): Failed opening required 'D:\sites\lara\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\sites\lara\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP 1. {main}() D:\sites\lara\artisan:0
PHP 2. require() D:\sites\lara\artisan:16
Warning: require(D:\sites\lara\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\sites\lara\bootstrap\autoload.php on line 17
Call Stack:
0.0002 231464 1. {main}() D:\sites\lara\artisan:0
0.0005 236592 2. require('D:\sites\lara\bootstrap\autoload.php') D:\sites\lara\artisan:16
Fatal error: require(): Failed opening required 'D:\sites\lara\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\sites\lara\bootstrap\autoload.php on line 17
Call Stack:
0.0002 231464 1. {main}() D:\sites\lara\artisan:0
0.0005 236592 2. require('D:\sites\lara\bootstrap\autoload.php') D:\sites\lara\artisan:16
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Warning: require(D:\sites\lara\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\sites\lara\boo
tstrap\autoload.php on line 17
PHP Stack trace:
PHP 1. {main}() D:\sites\lara\artisan:0
PHP 2. require() D:\sites\lara\artisan:16
PHP Fatal error: require(): Failed opening required 'D:\sites\lara\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\sites\lara\boot
strap\autoload.php on line 17
PHP Stack trace:
PHP 1. {main}() D:\sites\lara\artisan:0
PHP 2. require() D:\sites\lara\artisan:16
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose]
[-o|--optimize-autoloader] [packages1] ... [packagesN]
If I try by typing composer create-project laravel/laravel
I have
Installing laravel/laravel (v4.0.0)
- Installing laravel/laravel (v4.0.0)
Downloading: 100%
Downloading: 100%
Downloading: 100%
[Composer\Downloader\TransportException]
The "http://nodeload.github.com/laravel/laravel/zip/v4.0.0" 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]
Thanx for your help
Jason Lewis is right. Just comment out the openssl extension in your php.ini, run the command again in cmd shall fix your problem. No need to restart your PC or server.
You should not be calling update. You should first call install.
As for the create-project method, I also had the same problem. But it went away.
Please consult the documentation fully when attempting an install.

Resources