Your requirements could not be resolved to an installable set of packages.


安装阿里云短信sdk时,报这个错误

./composer.json has been updated 
Running composer update alibabacloud/dysmsapi-20170525 
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 alibabacloud/dysmsapi-20170525 3.0.0 (exact version match: 3.0.0 or 3.0.0.0), found alibabacloud/dysmsapi-201705
25[dev-master, 0.1.0, ..., 0.1.4, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 2.0.6, ..., 2.0.24] but it does not match the constraint.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. 

解决办法:更新composer源

composer config -g repos.packagist composer https://mirrors.tencent.com/composer/

重新安装扩展库,即可正常安装。