安装 workerman/http-client不成功怎么处理?

veinliu

composer require workerman/http-client

root@Database:~# composer require workerman/http-client
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^0.1.1 for workerman/http-client
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
composer require workerman/http-client

Installation failed, reverting ./composer.json to its original content.

[Composer\Downloader\TransportException]
The "https://repo.packagist.org/p/workerman/gateway-worker-demo.json" file
could not be downloaded: SSL: Success
Failed to enable crypto
failed to open stream: operation failed

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

3132 4 0
4个回答

veinliu

请问各位前辈,这个是怎么回事?

  • 暂无评论
veinliu

composer require workerman/http-client
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^0.1.1 for workerman/http-client
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
Failed to download psr/http-message from dist: The zip extension and unzip command are both missing, skipping.
Your command-line PHP is using multiple ini files. Run php --ini to show them.
Now trying to download from source

  • Installing psr/http-message (1.0.1): Cloning f6561bf28d

Installation failed, reverting ./composer.json to its original content.

[RuntimeException]
Failed to clone https://github.com/php-fig/http-message.git, git was not fo
und, check that it is installed and in your PATH env.

sh: 1: git: not found

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

  • 暂无评论
veinliu

安装好了,但是没有看到新建http client这样的文件夹,不知道是不是安装成功了。

  • 暂无评论
lixiaonan777

遇到了同样的问题,综合查询的资料,如下,其他百度出来的可能无用。
首先使用阿里的源
先composer workerman
然后composer http-client
本人亲测,成功

  • 暂无评论
年代过于久远,无法发表回答
🔝