Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why composer does not installing laravel 5.6 propoerly?

I am unable to install Laravel 5.6 on my wamp server. I have following setup

  • PHP Version 7.1.3
  • Composer Version 1.6.3 2018-01-31

When I am trying to install laravel application through composer, I am receiving following error in cmd

Warning: count(): Parameter must be an array or an object that implements Counta ble in C:\Users\MyName\AppData\Roaming\Composer\vendor\symfony\process\Pipes\Windo wsPipes.php on line 221

cmd returning these errors multiple times and at the end the error following message receiving

Application ready! Build something amazing.

When I am trying to run this command php artisan serve then cmd return following error

Warning: require(D:\wamp64\www\Laravel5.6\PR/vendor/autoload.php): failed to ope n stream: No such file or directory in D:\wamp64\www\Laravel5.6\PR\artisan on li ne 18

Fatal error: require(): Failed opening required 'D:\wamp64\www\Laravel5.6\PR/ven dor/autoload.php' (include_path='.;C:\php\pear') in D:\wamp64\www\Laravel5.6\PR\ artisan on line 18

I have searched about it and found a couple of articles but all of them are saying this is about PHP version and some are saying I need to update the composer and some says I need to stop proxy or any anti-virus software.

I have done all above steps as instructed in different articles but still facing the same problem. I am still failed to install laravel 5.6.

I would like to appreciate if someone guides me that how can I fix the issue.

Edited

After following the instruction of @laravel levaral answer, I am facing below following errors.

[Composer\Exception\NoSslException]
  The openssl extension is required for SSL/TLS protection but is not availab
  le. If you can not enable the openssl extension, you can disable this error
  , at your own risk, by setting the 'disable-tls' option to true.


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
s] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<dir
ectory>] [<version>]

The above errors are also in the cmd

like image 340
user3698265 Avatar asked Mar 07 '18 07:03

user3698265


2 Answers

Laravel 5.6 require PHP >= 7.1.3

https://laravel.com/docs/5.6#installing-laravel

You don't need 'php artisan serve' if you are running in wamp/xamp. Just make virtual host and point your vhost directory to your installation folder blog/public.

like image 93
Gabriel Avatar answered Sep 19 '22 16:09

Gabriel


It is not installing because it exists in cache of your system.

Run the following commands.

composer clearcache

Also specify the version while creating the project.

composer create-project --prefer-dist laravel/laravel blog "5.6.*"

make sure you have installed open-ssl extension in your php or run this command

composer config -g -- disable-tls true

for Installing extension in windows, u can simply uncomment this line

extension=php_openssl.dll

restart your server and you are good to go.

Hope this helps

like image 32
Romantic Dev Avatar answered Sep 18 '22 16:09

Romantic Dev