作曲家更新时如何解决错误255
我已经尝试 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题可能是您使用的是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
First thing to do is to configure your PHP version to 7.x here a link on how to do it:
https://www.hostgator.com/help/article/php-configuration-plugin
Then on the console run composer using that PHP version like:
/opt/cpanel/ea-php73/root/usr/bin/php /opt/cpanel/composer/bin/composer install
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 findbindir=
on your browser.