提问人:Loom 提问时间:11/7/2023 最后编辑:Loom 更新时间:11/9/2023 访问量:72
Composer 2.2 在使用 7.3 时在使用 7.3 以下的 PHP 时出现错误,但无论如何都不需要它
Composer 2.2 gives error on using PHP below 7.3 when it is using 7.3 but shouldnt need it anyway
问:
在 CentOS 7 上(公司框,因此无法更改)。Laravel 版本上周停止使用 Composer 1。 升级到 Composer 2.3 并升级到 PHP 7.3。 开始获得以下内容:
“低于 7.3.0 的 PHP 版本不支持使用 curl 连接到安全代理。”
这令人困惑,因为 7.3 已安装并确认 composer 正在使用它。
假设问题实际上是 CURL 版本(有 7.29、7.5 支持安全卷曲),因此安装了支持 PHP < 7.3 的 Composer 2.2。
但现在出现同样的错误: “低于 7.3.0 的 PHP 版本不支持使用 curl 连接到安全代理。”
这很令人困惑,因为 Composer 2.2 不需要 PHP 7.3
composer 诊断输出:
$ composer diagnose
Checking composer.json: WARNING
require.tymon/jwt-auth : exact version constraints (1.0.0-rc.5) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.
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: FAIL
[Composer\Downloader\TransportException] Connecting to a secure proxy using curl is not supported on PHP versions below 7.3.0.
Composer version: 2.2.2
PHP version: 7.3.33
PHP binary path: /usr/bin/php
OpenSSL version: OpenSSL 1.0.2k 26 Jan 2017
cURL version: 7.29.0 libz 1.2.7 ssl NSS/3.53.1
zip: extension present, unzip present, 7-Zip not available
谁能对此有所了解?我在建造时死在水里了。
谢谢
CentOS 7,在企业代理后面
答:
0赞
Loom
11/9/2023
#1
虽然 Composer 2.2 支持 PHP 7.2,但需要 cURL 7.52。 CentOS 7 使用 cURL 7.29。 放弃尝试使用 Composer 2.2 以避免 CentOS 7 上的 cURL 更新
评论
composer diagnose