PHP composer 报错
2021-05-15 本文已影响0人
bianruifeng
composer依赖包安装中出现这个错误:
guo@guoiMac yoshop2.0 % composer install
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
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 topthink/framework, it could not be found in any version, there may be a typo in the package name.
Problem 2
- Root composer.json requires topthink/think-orm, it could not be found in any version, there may be a typo in the package name.
Problem 3
- Root composer.json requires topthink/think-multi-app, it could not be found in any version, there may be a typo in the package name.
Problem 4
- Root composer.json requires qiniu/php-sdk, it could not be found in any version, there may be a typo in the package name.
Problem 5
- Root composer.json requires aliyuncs/oss-sdk-php, it could not be found in any version, there may be a typo in the package name.
Problem 6
- Root composer.json requires qcloud/cos-sdk-v5, it could not be found in any version, there may be a typo in the package name.
Problem 7
- Root composer.json requires kosinix/grafika, it could
解决:
先查看包来源地址,查询命令: composer config -l -g
执行命令: composer config -g repo.packagist composer https://packagist.org
而后composer install
完美成功。
也可以尝试使用阿里云的源,并对composer进行升级
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer selfupdate