最开始使用composer官网作为packagist,下载超时,科学上网也安装不了
[Composer\Downloader\TransportException]
curl error 28 while downloading https://repo.packagist.org/p2/symfony/process.json: Timeout was reached
将地址换为国内镜像(全局 去点 -g 就是只当前项目)
composer config -g repo.packagist composer https://packagist.phpcomposer.com
然后执行
composer require topthink/think-queue
发现没有think-queue,这个包。
再切换成最后将packagit换成阿里云的地址:
全局配置阿里云镜像:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
仅当前工程:
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
并再次执行
composer require topthink/think-queue
报错 Could not find a version of package encore/laravel-admin matching your minimum-stability (dev). Require it with an explicit version constraint allowing its desired stability.
1. 建议先将Composer版本升级到最新:
composer self-update
2. 执行诊断命令:
composer diagnose
3. 清除缓存:
composer clear
4. 若项目之前已通过其他源(比如composer官网)安装,则需要更新 composer.lock 文件,执行命令:
composer update --lock
再此尝试安装消息队列
composer require topthink/think-queue