因为开发一个功能,需要做图片比对。所以需要安装一个阿里云sdk,于是使用composer安装,但是一直安装失败,提示PHP最低版本需要>=7.4。

$ composer require alibabacloud/facebody-20191230

$ composer require alibabacloud/facebody-20191230
Using version ^3.0 for alibabacloud/facebody-20191230
./composer.json has been created
Running composer update alibabacloud/facebody-20191230
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
– Conclusion: don’t install alibabacloud/facebody-20191230 3.0.7 (conflict analysis result)
– Conclusion: don’t install alibabacloud/facebody-20191230 3.0.8 (conflict analysis result)
– alibabacloud/tea-oss-utils 0.2.0 requires ocramius/package-versions ^1.5 -> satisfiable by ocramius/package-versions[1.5.0, …, 1.11.0].
– ocramius/package-versions[1.5.0, …, 1.5.1] require php ^7.3.0 -> your php version (5.6.27) does not satisfy that requirement.
– ocramius/package-versions[1.6.0, …, 1.9.0] require php ^7.4.0 -> your php version (5.6.27) does not satisfy that requirement.
– ocramius/package-versions[1.10.0, …, 1.11.0] require php ^7.4.7 -> your php version (5.6.27) does not satisfy that requirement.
– alibabacloud/facebody-20191230[3.0.0, …, 3.0.4] require alibabacloud/tea-oss-sdk ^0.3.0 -> satisfiable by alibabacloud/tea-oss-sdk[0.3.0, …, 0.3.5].
– alibabacloud/tea-oss-sdk[0.3.0, …, 0.3.5] require alibabacloud/tea-oss-utils ^0.2.0 -> satisfiable by alibabacloud/tea-oss-utils[0.2.0, 0.2.1, 0.2.2, 0.2.3].
– You can only install one version of a package, so only one of these can be installed: alibabacloud/tea-oss-utils[0.2.0, …, 0.3.1].
– alibabacloud/facebody-20191230[3.0.0, …, 3.0.4] require alibabacloud/tea-oss-utils ^0.3.0 -> satisfiable by alibabacloud/tea-oss-utils[0.3.0, 0.3.1].
– Root composer.json requires alibabacloud/facebody-20191230 ^3.0 -> satisfiable by alibabacloud/facebody-20191230[3.0.0, …, 3.0.8].

You can also try re-running composer require with an explicit version constraint, e.g. “composer require alibabacloud/facebody-20191230:*” to figure out if any version is installable, or “composer require alibabacloud/facebody-20191230:^2.1” if you know which you need.
Installation failed, deleting ./composer.json.

【解决方法】忽略版本强制更新“–ignore-platform-reqs”

$ composer require alibabacloud/facebody-20191230 --ignore-platform-reqs

结果还有报错:

$ composer require alibabacloud/facebody-20191230
Using version ^3.0 for alibabacloud/facebody-20191230
./composer.json has been created
Running composer update alibabacloud/facebody-20191230
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
– Conclusion: don’t install alibabacloud/facebody-20191230 3.0.7 (conflict analysis result)
– Conclusion: don’t install alibabacloud/facebody-20191230 3.0.8 (conflict analysis result)
– alibabacloud/tea-oss-utils 0.2.0 requires ocramius/package-versions ^1.5 -> satisfiable by ocramius/package-versions[1.5.0, …, 1.11.0].
– ocramius/package-versions[1.5.0, …, 1.5.1] require php ^7.3.0 -> your php version (5.6.27) does not satisfy that requirement.
– ocramius/package-versions[1.6.0, …, 1.9.0] require php ^7.4.0 -> your php version (5.6.27) does not satisfy that requirement.
– ocramius/package-versions[1.10.0, …, 1.11.0] require php ^7.4.7 -> your php version (5.6.27) does not satisfy that requirement.
– alibabacloud/facebody-20191230[3.0.0, …, 3.0.4] require alibabacloud/tea-oss-sdk ^0.3.0 -> satisfiable by alibabacloud/tea-oss-sdk[0.3.0, …, 0.3.5].
– alibabacloud/tea-oss-sdk[0.3.0, …, 0.3.5] require alibabacloud/tea-oss-utils ^0.2.0 -> satisfiable by alibabacloud/tea-oss-utils[0.2.0, 0.2.1, 0.2.2, 0.2.3].
– You can only install one version of a package, so only one of these can be installed: alibabacloud/tea-oss-utils[0.2.0, …, 0.3.1].
– alibabacloud/facebody-20191230[3.0.0, …, 3.0.4] require alibabacloud/tea-oss-utils ^0.3.0 -> satisfiable by alibabacloud/tea-oss-utils[0.3.0, 0.3.1].
– Root composer.json requires alibabacloud/facebody-20191230 ^3.0 -> satisfiable by alibabacloud/facebody-20191230[3.0.0, …, 3.0.8].

You can also try re-running composer require with an explicit version constraint, e.g. “composer require alibabacloud/facebody-20191230:*” to figure out if any version is installable, or “composer require alibabacloud/facebody-20191230:^2.1” if you know which you need.
Installation failed, deleting ./composer.json.

【解决方法】根据提示,更改安装命令:

$ composer require alibabacloud/facebody-20191230:* --ignore-platform-reqs

终于可以了

作者 admin

百度广告效果展示