已經(jīng)實(shí)現(xiàn)了tcp/ip連接設(shè)備,現(xiàn)在需要增加mqtt方式;實(shí)現(xiàn)數(shù)據(jù)的讀寫。
試了composer require workerman/mqtt 一直報(bào)錯(cuò),裝不了,也不清楚具體問(wèn)題在哪里;composer 已安裝,
Composer version 2.6.6 2023-12-08 18:32:26
提問(wèn)要盡量詳細(xì),有報(bào)錯(cuò)發(fā)完整的具體報(bào)錯(cuò)
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:
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
Installation failed, deleting ./composer.json.
[root@iZ5idcd7hxknovZ ~]#