作曲家更新时如何解决错误255

发布于 2025-02-10 06:13:40 字数 1348 浏览 2 评论 0 原文

我已经尝试 COMPOSER UPDATE -Ignore-Platform-Reqs docker中的Laravel项目,但是有

script @php工匠软件包:Discover -Ansi处理后autoload-dump事件返回了使用错误代码255

错误。

从这里

没有帮助我,因为Handler.php

Composer诊断返回,

Checking composer.json: WARNING
require.laravel/ui : exact version constraints (2.4) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.3.7
PHP version: 8.0.2
PHP binary path: /usr/local/bin/php
OpenSSL version: OpenSSL 1.1.1d  10 Sep 2019
cURL version: 7.64.0 libz 1.2.11 ssl OpenSSL/1.1.1d
zip: extension not loaded, unzip present, 7-Zip not available

i've tried to composer update --ignore-platform-reqs laravel project in docker but there is

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

error.

Solutions from here

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

didn't help me, cuz there is already ok with handler.php

composer diagnose returns

Checking composer.json: WARNING
require.laravel/ui : exact version constraints (2.4) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.3.7
PHP version: 8.0.2
PHP binary path: /usr/local/bin/php
OpenSSL version: OpenSSL 1.1.1d  10 Sep 2019
cURL version: 7.64.0 libz 1.2.11 ssl OpenSSL/1.1.1d
zip: extension not loaded, unzip present, 7-Zip not available

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ぇ气 2025-02-17 06:13:41

问题可能是您使用的是Laravel 5.X,并且您的托管提供商设置为PHP 8.x

  • 首先要做的是将PHP版本配置为7.x,此处是有关如何执行操作的链接:


  • 然后在控制台运行作曲家使用该php版本上,例如:
    /opt/cpanel/ea-php73/root/usr/bin/php/php/opt/cpanel/cpanel/cpanel/bin/composer install

请记住,无论如何,PHP的位置可能会在Ever Hosting Provider上改变,无论如何,您可以使用 echo phpinfo(); 在公共dir上找到bin dir,然后在浏览器上使用ctrl+f来查找 bindir =

The problem might be that you are using Laravel 5.x and your hosting provider is set with php 8.x

Keep in mind that the location of PHP could change on ever hosting provider, anyway you can find the bin dir creating a php file on your public dir with echo phpinfo(); and then use ctrl+f to find bindir= on your browser.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文