gpt4 book ai didi

php - 无法安装 Composer Azure 服务器

转载 作者:行者123 更新时间:2023-12-03 05:54:40 25 4
gpt4 key购买 nike

我正在尝试从扩展在 azure 门户上安装 Composer ,它抛出:

Failed to install Composer - ExitCode: -1073741819, Output: D:\home\SiteExtensions\ComposerExtension># Install Composer D:\home\SiteExtensions\ComposerExtension>cd Commands D:\home\SiteExtensions\ComposerExtension\Commands>IF EXIST composer.phar (rm -f composer.phar ) D:\home\SiteExtensions\ComposerExtension\Commands>IF NOT EXIST "D:\local\AppData\Composer" (mkdir "D:\local\AppData\Composer" ) D:\home\SiteExtensions\ComposerExtension\Commands>IF NOT EXIST "D:\local\LocalAppData\Composer" (mkdir "D:\local\LocalAppData\Composer" ) D:\home\SiteExtensions\ComposerExtension\Commands>php -r "readfile('https://getcomposer.org/installer');" | php, Error: '#' is not recognized as an internal or external command, operable program or batch file., Kudu.Core.Infrastructure.CommandLineException: '#' is not recognized as an internal or external command, operable program or batch file. D:\home\SiteExtensions\ComposerExtension\install.cmd at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func2 onWriteOutput, Func2 onWriteError, Encoding encoding, String arguments, Object[] args) at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args) at Kudu.Core.SiteExtensions.SiteExtensionManager.<>c__DisplayClass25_1.b__1() at Kudu.Core.Infrastructure.OperationManager.<>c__DisplayClass2_0.b__0() at Kudu.Core.Infrastructure.OperationManager.Attempt[T](Func1 action,
Int32 retries, Int32 delayBeforeRetry, Func
2 shouldRetry) at Kudu.Core.Infrastructure.OperationManager.Attempt(Action action, Int32 retries, Int32 delayBeforeRetry) at Kudu.Core.SiteExtensions.SiteExtensionManager.d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Kudu.Core.SiteExtensions.SiteExtensionManager.d__24.MoveNext()

感谢您的帮助。

最佳答案

在我的测试中,这似乎是由于 PHP 运行时版本的构建所致。如果我在 Azure 门户中将 PHP 版本设置为 7.1,我将重现您的问题。但是如果我将 PHP 版本中的构建降级到 7.0,那么 Composer 扩展将安装得很好。

因此,目前您可以将 PHP 运行时降级到 7.0 作为解决方法。或者尝试手动下载composer.phar项目中的扩展。

关于php - 无法安装 Composer Azure 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43486006/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com