Laravel依赖关系无法通过作曲家检索.获得L4源的替代方法? [英] Laravel dependency cannot be retrieved via composer. Alternative for getting L4 source ?
问题描述
现在我有2天发生错误,无论我如何尝试,我都无法通过Composer获得完整的L4源.
I have a error happening for 2 days now I simply cannot get full L4 source via Composer no matter what I try.
我落后于Windows 8& WAMP x64 PHP 5.4 mod_ssl和openssl_module已启用.我尝试了多个位置/个人电脑/网络都抛出相同的错误.
I'm behind Windows 8 & WAMP x64 PHP 5.4 mod_ssl and openssl_module enabled. I tried multiple locations/pc's/networks all throw same error.
http://nodeload.github.com/php-fig/log/zip/fe0936ee26643249e916849d48e3a51d5f5e278b
作曲家无法检索以下资源.这是从我的终端粘贴出来的副本:
http://nodeload.github.com/php-fig/log/zip/fe0936ee26643249e916849d48e3a51d5f5e278b
Following resource cannot be retrived by composer. Here is copy paste out of my terminal:
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 9/6/2013 21:42 app
d---- 9/6/2013 21:42 bootstrap
d---- 9/6/2013 21:42 public
d---- 9/10/2013 00:35 vendor
-a--- 9/6/2013 21:42 11 .gitattributes
-a--- 9/6/2013 21:42 69 .gitignore
-a--- 9/6/2013 21:42 2424 artisan
-a--- 9/6/2013 21:42 687 composer.json
-a--- 9/10/2013 00:29 799883 composer.phar
-a--- 9/6/2013 21:42 145 CONTRIBUTING.md
-a--- 9/6/2013 21:42 566 phpunit.xml
-a--- 9/6/2013 21:42 1795 readme.md
-a--- 9/6/2013 21:42 519 server.php
PS C:\wamp\www> php composer.phar install
Loading composer repositories with package information
Installing dependencies
- Installing psr/log (1.0.0)
Downloading: 100%
Downloading: 100%
Downloading: 100%
[Composer\Downloader\TransportException]
The "http://nodeload.github.com/php-fig/log/zip/fe0936ee26643249e916849d48e3a51d5f5e278b" file could not be downloa
ded: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-p
rogress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
推荐答案
所以我找到了解决此问题的方法:
So I found the solution for this problem:
导致此异常/错误的原因是从http重定向到https uri.这意味着您需要启用MOD_SSL
( http.d )和OPENSSL_EXTENSION
或PHP_OPENSSL
( php.ini ).
What causes this exception/error is a redirect from http to https uri. Meaning you need to have MOD_SSL
(http.d) and OPENSSL_EXTENSION
or PHP_OPENSSL
(php.ini) enabled.
在我的情况下,发生了一个全新安装的WAMP
运行,一如既往地通过WAMP
GUI启用了OPENSSL
扩展的情况(通过在try区域中单击WAMP图标,然后导航到PHP/Apache)设置).
What happened in my case was I had a fresh install of WAMP
running as always I enabled the OPENSSL
extension via WAMP
GUI (by left clicking on WAMP icon in try area and then navigating to PHP/Apache settings).
但这仅对Apache启用OPENSSL
,事实证明PHP CLI使用它自己的php.ini
文件,并且您还需要在该文件中启用OPENSSL
.
This however only enables OPENSSL
for Apache turns out the PHP CLI uses it's own php.ini
file and you need to enable the OPENSSL
in that one as well.
解决方案:
导航到WAMP
安装文件夹*/wamp/bin/php(x)/php.ini
,向下滚动至扩展名,然后填写发现禁用OPENSSL
的注释行.取消注释该行,OPENSSL
也应适用于CLI.
SOLUTION:
Navigate to your WAMP
installation folder */wamp/bin/php(x)/php.ini
scroll down to extensions and you fill find a commented line disabling OPENSSL
. Uncomment this line and OPENSSL
should work for CLI as well.
这篇关于Laravel依赖关系无法通过作曲家检索.获得L4源的替代方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!