laravel 4 安装问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16918616/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 07:52:59  来源:igfitidea点击:

laravel 4 installation problems

gitterminallaravellaravel-4composer-php

提问by Joe

i have been struggling with this for about 20 hours now and i cannot move forward. I am hopeless and tired from all that searching. Dont know where else should i try to find the solution. At the begining i should probably say that i am not a terminal/composer/git user. I am trying to install the laravel 4 framework. I have been googling a lot and found some tutorials, some of the even here on stackoverflow but noting really helped me.

我已经为此苦苦挣扎了大约 20 个小时,但我无法继续前进。我对所有的搜索感到绝望和疲倦。不知道我还应该在哪里尝试找到解决方案。一开始我应该说我不是终端/作曲家/git 用户。我正在尝试安装 Laravel 4 框架。我一直在谷歌上搜索了很多并找到了一些教程,其中一些甚至在 stackoverflow 上,但注意到确实对我有帮助。

I have the basic github master zip package extracted at my localhost. I have installed composer i have also installed git on my local machine. I have uncommented the php.ini "extension=php_openssl.dll". Like i said i dont use terminal regulary but i manage to cd into my extracted laravel folder and i have run "composer install" command which starts the installation. But soon i get error.

我在我的本地主机上提取了基本的 github master zip 包。我已经安装了 composer 我也在我的本地机器上安装了 git。我已取消注释 php.ini " extension=php_openssl.dll"。就像我说的,我不经常使用终端,但我设法 cd 到我提取的 Laravel 文件夹中,并且我运行了“ composer install”命令开始安装。但很快我就会出错。

  [Composer\Downloader\TransportException]
  The "http://nodeload.github.com/doctrine/lexer/zip/bc0e1f0cc285127a38c6c8ea
  88bc5dba2fd53e94" file could not be downloaded: failed to open stream: Unab
  le to find the socket transport "ssl" - did you forget to enable it when yo
  u configured PHP?

Which should be fixed by that change i made in php.ini file. Of course i have restart the server but i still get this error. I have also reinstalled wamp to the newer version so right now i am using php 5.4.3

这应该通过我在 php.ini 文件中所做的更改来修复。当然我已经重新启动服务器,但我仍然收到此错误。我还重新安装了 wamp 到较新的版本,所以现在我正在使用 php 5.4.3

When i try to open my laravel public i get this error.

当我尝试打开 laravel public 时,出现此错误。

( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: require(C:\wamp\www\laravel\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\wamp\www\laravel\bootstrap\autoload.php on line 17
Call Stack
#   Time    Memory  Function    Location
1   0.0005  247400  {main}( )   ..\index.php:0
2   0.0011  252392  require( 'C:\wamp\www\laravel\bootstrap\autoload.php' ) ..\index.php:21

( ! ) SCREAM: Error suppression ignored for
( ! ) Fatal error: require(): Failed opening required 'C:\wamp\www\laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\laravel\bootstrap\autoload.php on line 17
Call Stack
#   Time    Memory  Function    Location
1   0.0005  247400  {main}( )   ..\index.php:0
2   0.0011  252392  require( 'C:\wamp\www\laravel\bootstrap\autoload.php' ) ..\index.php:21

Which is i believe beacuse its just not complete since composer does not downloaded all the dependencies. I dont know what esle to say if you need more info just say so. Thank you for any help. And at last i am sorry for my poor english its my secondary language.

我相信这是因为它不完整,因为作曲家没有下载所有依赖项。如果您需要更多信息,我不知道该说些什么。感谢您的任何帮助。最后,我为我可怜的英语感到抱歉,这是我的第二语言。



UPDATE:

更新:

So i was searching some more and found this article. I was missing this step: START > MY COMPUTER > PROPERTIES > ADVANCED > ENVIRONMENT VARIABLES > double click on PATH from SYSTEM VARIABLES > now copy the path address of git installer (normally in windows it's by default address is C:\Program Files\Git\bin)After that it gone further, asked for my github acc because it says that its private depo. So i have created one today and used it. Then it throws me this error.

所以我搜索了更多并找到了这篇文章。我错过了这一步:START > MY COMPUTER > PROPERTIES > ADVANCED > ENVIRONMENT VARIABLES > double click on PATH from SYSTEM VARIABLES > now copy the path address of git installer (normally in windows it's by default address is C:\Program Files\Git\bin)在那之后,它更进一步,要求我的 github acc,因为它说它是私人仓库。所以我今天创建了一个并使用了它。然后它向我抛出这个错误。

      [Composer\Downloader\TransportException]
  The "https://api.github.com/authorizations" file could not be downloaded: U
  nable to find the wrapper "https" - did you forget to enable it when you co
  nfigured PHP?
  failed to open stream: Invalid argument



install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-c
ustom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--opt
imize-autoloader]

My php.ini openssl line is uncommented and when i look at phpinfo i can see that its loaded.openssl OpenSSL support enabled OpenSSL Library Version OpenSSL 1.0.1c 10 May 2012 OpenSSL Header Version OpenSSL 1.0.1c 10 May 2012

我的 php.ini openssl 行没有注释,当我查看 phpinfo 时,我可以看到它已加载。openssl OpenSSL support enabled OpenSSL Library Version OpenSSL 1.0.1c 10 May 2012 OpenSSL Header Version OpenSSL 1.0.1c 10 May 2012

回答by Bala

The issue with the php.ini file of WAMP

WAMP的php.ini文件问题

the php.ini used by the command line is located in the "PHP folder" and is NOTthe same one used by the Apache server.

命令行使用的 php.ini 位于“PHP 文件夹”中,NOT与 Apache 服务器使用的相同。

Find the php.ini from the WAMP > localhost > php > binfile (In my case C:\localhost\bin\php\php5.3.13)

WAMP > localhost > php > bin文件中找到 php.ini (在我的例子中是 C:\localhost\bin\php\php5.3.13)

And enable the extension=php_openssl.dll

并启用 extension=php_openssl.dll

Then it should work

那么它应该工作

回答by Craig Morgan

Same issue with me. I'm using XAMPP and there is only one php.ini in there. I think I have set everything up correctly according to the two hours of Googling I have done on the issue. I've also turned off the Firewall. This is very frustrating! My dev environment is in Windows so I really don't want to have to start messing about with Linux virtual machines.

和我一样的问题。我正在使用 XAMPP,其中只有一个 php.ini。我想我已经根据我在这个问题上所做的两个小时的谷歌搜索正确设置了一切。我也关闭了防火墙。这非常令人沮丧!我的开发环境在 Windows 中,所以我真的不想开始弄乱 Linux 虚拟机。

回答by Ryan Tablada

There is a standalone no composer installation: https://github.com/barryvdh/laravel-preloaded

有一个独立的无作曲家安装:https: //github.com/barryvdh/laravel-preloaded

Note that this will not have an upgrade path and is experimental.

请注意,这不会有升级路径并且是实验性的。

回答by scrfix

I see you have the answer already however if you or anyone else is having issues installing Laravel 4 using WAMP you can use my flowcharts for a step by step installation. https://github.com/scrfix/Laravel4x_FlowCharts

我看到您已经有了答案,但是如果您或其他任何人在使用 WAMP 安装 Laravel 4 时遇到问题,您可以使用我的流程图逐步安装。 https://github.com/scrfix/Laravel4x_FlowCharts

Wayne

韦恩