在Amazon 1 EC2中使用OpenSSL 1.0.2k-fips运行Composer 2有问题。
当我尝试运行php composer.phar update时,我得到:
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires linked library lib-openssl * but it has the wrong version installed or is missing from your system, make sure to load the extension providing it.
Problem 2
- Root composer.json requires minishlink/web-push 1.4.3 -> satisfiable by minishlink/web-push[v1.4.3].
- minishlink/web-push v1.4.3 requires lib-openssl * -> it has the wrong version installed or is missing from your system, make sure to load the extension providing it.向PHP询问有关带有OpenSSL的php -i | grep -i openssl扩展的信息,我可以看到它已经安装
SSL Version => OpenSSL/1.0.2k
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.2k-fips 26 Jan 2017
OpenSSL Header Version => OpenSSL 1.0.2k-fips 26 Jan 2017
Openssl default config => /etc/pki/tls/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
Native OpenSSL support => enabled运行php composer.phar show -p | grep -i openssl时
ext-openssl 0 The openssl PHP extension (actual version: )
lib-curl-openssl 1.0.2.11 curl OpenSSL version (1.0.2.11)
lib-openssl-fips 1.0.2.11 OpenSSL 1.0.2k-fips 26 Jan 2017看起来Composer 2并没有获得lib-openssl-fips库-openssl,而是获得了导致依赖问题的。
我很感谢你的帮助。
发布于 2022-08-17 15:03:05
如果您在目标平台上运行composer update,并且您知道lib-openssl-fips满足minishlink/web-push的lib-openssl要求,但是Composer不知道,您可以通过告诉它库(平台包)存在来帮助Composer。
这可以通过使用--ignore-platform-req选项和未检测库的参数来实现:
php composer.phar update --ignore-platform-req lib-openssl然后,Composer忽略了这个特定的平台需求,这样就不会妨碍检测可安装的包集。
https://stackoverflow.com/questions/73388045
复制相似问题