Welcome to Alibaba Cloud Elastic Compute Service !
[root@iZ5idcd7hxknovZ ~]# composer require workerman/mqtt --ignore-platform-reqs
PHP Warning: PHP Startup: curl: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20190902
These options need to match
in Unknown on line 0
Installation failed, deleting ./composer.json.
In RequireCommand.php line 225:
No composer.json present in the current directory (./composer.json), this m
ay be the cause of the following exception.
In PackageDiscoveryTrait.php line 356:
Could not find package workerman/mqtt. It was however found via repository
search, which indicates a consistency issue with the repository.
[root@iZ5idcd7hxknovZ ~]# composer require workerman/mqtt:dev-master --ignore-platform-reqs
PHP Warning: PHP Startup: curl: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20190902
These options need to match
in Unknown on line 0
./composer.json has been created
Running composer update workerman/mqtt
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 workerman/mqtt, it could not be found in any version, there may be a typo in the package name.
联系方式:wx:pxfaizy
composer require workerman/mqtt:dev-master 这个也试了
提问要尽量详细,有报错发完整的具体报错
Welcome to Alibaba Cloud Elastic Compute Service !
[root@iZ5idcd7hxknovZ ~]# composer require workerman/mqtt --ignore-platform-reqs
PHP Warning: PHP Startup: curl: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20190902
These options need to match
in Unknown on line 0
Installation failed, deleting ./composer.json.
In RequireCommand.php line 225:
No composer.json present in the current directory (./composer.json), this m
ay be the cause of the following exception.
In PackageDiscoveryTrait.php line 356:
Could not find package workerman/mqtt. It was however found via repository
search, which indicates a consistency issue with the repository.
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
[root@iZ5idcd7hxknovZ ~]# composer require workerman/mqtt:dev-master --ignore-platform-reqs
PHP Warning: PHP Startup: curl: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20190902
These options need to match
in Unknown on line 0
./composer.json has been created
Running composer update workerman/mqtt
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
Potential causes:
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
Installation failed, deleting ./composer.json.
[root@iZ5idcd7hxknovZ ~]#
不知道怎么贴图片,我把信息都复制过来了
就是编辑你的问题 在里面把截图放进去
执行 composer config -g --unset repos.packagist 删除composer代理
成功了,非常感谢;已赞助,一点心意;新年快乐,万分感谢!!!
php7,8都安装了 没有遇到什么问题 是不是你其他的扩展导致的哦
在后面加上 --ignore-platform-reqs这个试试呢
加了还是不成功呢
我的是 PHP 7.4.15 (cli) (built: Feb 21 2021 11:34:37) ( NTS )
统一回复,问题已解决,谢谢大家