为什么作曲家不正确安装laravel 5.6? [英] Why composer does not installing laravel 5.6 propoerly?

查看:85
本文介绍了为什么作曲家不正确安装laravel 5.6?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在我的wamp服务器上安装Laravel 5.6.我有以下设置

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

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

当我尝试通过composer安装laravel应用程序时,我在cmd

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

警告:count():参数必须是实现Counta的数组或对象 可以在C:\ Users \ MyName \ AppData \ Roaming \ Composer \ vendor \ symfony \ process \ Pipes \ Windo中 第221行的wsPipes.php

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多次返回这些错误,并在收到消息后最终返回错误

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

应用程序就绪!构建惊人的东西.

Application ready! Build something amazing.

当我尝试运行此命令php artisan serve时,cmd返回以下错误

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

警告:require(D:\ wamp64 \ www \ Laravel5.6 \ PR/vendor/autoload.php):操作失败 n流:li上的D:\ wamp64 \ www \ Laravel5.6 \ PR \ artisan中没有这样的文件或目录 ne 18

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

严重错误:require():无法打开所需的'D:\ wamp64 \ www \ Laravel5.6 \ PR/ven D:\ wamp64 \ www \ Laravel5.6 \ PR \中的dor/autoload.php'(include_path ='.; C:\ php \ pear') 工匠在线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

我进行了搜索,找到了几篇文章,但所有文章都说这是关于PHP版本的,还有一些文章说我需要更新作曲家,而一些文章说我需要停止代理或任何防病毒软件.

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.

我已经按照不同文章中的说明完成了所有上述步骤,但是仍然面临着相同的问题.我仍然无法安装laravel 5.6.

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.

已编辑

按照 的说明进行操作之后? @laravel levaral 答案,我正面临以下错误.

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

上述错误也在cmd

推荐答案

Laravel 5.6需要PHP> = 7.1.3

Laravel 5.6 require PHP >= 7.1.3

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

如果在wamp/xamp中运行,则不需要"php artisan serve".只需设置虚拟主机,然后将您的vhost目录指向安装文件夹blog/public.

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.

这篇关于为什么作曲家不正确安装laravel 5.6?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆