作曲家自我更新 TransportException
Posted
技术标签:
【中文标题】作曲家自我更新 TransportException【英文标题】:composer self-update TransportException 【发布时间】:2013-12-25 06:42:57 【问题描述】:我尝试通过:composer self-update
更新 Composer
但它遇到Composer\Downloader\TransportException
这是我从composer self-update --verbose
和php -d "apc.enable_cli=0" composer.phar self-update --verbose
那里得到的信息
Updating to version .
Downloading: 100%
[Composer\Downloader\TransportException]
"https://getcomposer.org/composer.phar" appears broken, and returned an empty 200 response
Exception trace:
() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:192
Composer\Util\RemoteFilesystem->get() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:62
Composer\Util\RemoteFilesystem->copy() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/SelfUpdateCommand.php:73
Composer\Command\SelfUpdateCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:897
Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:191
Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:117
Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:83
Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:43
require() at C:\ProgramData\ComposerSetup\bin\composer.phar:15
self-update
【问题讨论】:
尝试完全删除它并获取最新设置而不是使用更新? @user1850712 3天前我已经安装了,但我认为它有问题 不确定这是否会有所帮助,但请观看此视频以安装 composer 和 laravel4 youtube.com/… @user1850712 感谢您的视频,但对我没有帮助php composer.phar diagnose
这个命令有没有显示什么?
【参考方案1】:
我终于找出问题所在了。 当我通过代理服务器连接到互联网时,必须首先配置作曲家,正如iconoclast 中解释的PHP Composer behind http proxy 我试图将此变量添加到系统环境路径(在 Windows 上的源):
HTTP_PROXY(value = my.proxy.address:port)
HTTPS_PROXY(value = my.proxy.address:port)
HTTP_PROXY_REQUEST_FULLURI(value = 0)
HTTPS_PROXY_REQUEST_FULLURI(value = 0)
但是在设置最后 2 个变量后,composer diag
中的这 2 个测试遇到了错误:
Checking HTTP proxy support for request_fulluri
Checking HTTPS proxy support for request_fulluri
最后通过删除它们并重新启动我的电脑,所有场景都按预期进行。;)
顺便说一句,感谢您的支持
【讨论】:
干得好.. ...你是怎么想出来的? @user1850712 我检查了composer diag
命令输出,这表明这是一个问题。以上是关于作曲家自我更新 TransportException的主要内容,如果未能解决你的问题,请参考以下文章