【发布时间】:2020-06-03 10:29:29
【问题描述】:
当我尝试使用以下命令为我的 Laravel 实例安装 Elasticsearch 时:
composer require elasticsearch/elasticsearch
我收到了这个错误:
问题 1 - elasticsearch/elasticsearch v7.6.0 需要 guzzlehttp/ringphp dev-fork-elasticsearch -> 找不到匹配的包。 - tamayo/laravel-scout-elastic 5.0.0 需要 elasticsearch/elasticsearch ^5.0 -> 可满足 弹性搜索/弹性搜索[5.0.x-dev]。 - tamayo/laravel-scout-elastic 5.0.0 需要 elasticsearch/elasticsearch ^5.0 -> 可满足 弹性搜索/弹性搜索[5.0.x-dev]。 - tamayo/laravel-scout-elastic 5.0.0 需要 elasticsearch/elasticsearch ^5.0 -> 可满足 弹性搜索/弹性搜索[5.0.x-dev]。 - 只能安装以下之一:elasticsearch/elasticsearch[v7.6.1, 5.0.x-dev]。 - elasticsearch/elasticsearch ^7.6 的安装请求 -> elasticsearch/elasticsearch[v7.6.0, v7.6.1] 可满足。 - tamayo/laravel-scout-elastic ^5.0 的安装请求 -> 可由 tamayo/laravel-scout-elastic[5.0.0] 满足。
潜在原因: - 包名中的拼写错误 - 根据您的最低稳定性设置,该软件包在足够稳定的版本中不可用,请参阅 https://getcomposer.org/doc/04-schema.md#minimum-stability 了解更多 细节。 - 这是一个私有包,您忘记添加自定义存储库来查找它
阅读https://getcomposer.org/doc/articles/troubleshooting.md 更多常见问题。
安装失败,正在将 ./composer.json 还原为其原始 内容。
然后我尝试使用以下命令安装错误中提到的软件包:
composer require guzzlehttp/ringphp
我收到以下警告:
guzzlehttp/ringphp 包被废弃,你应该避免使用它。不 建议更换。包 guzzlehttp/streams 被废弃, 你应该避免使用它。没有建议更换
然后我再次尝试安装它,我得到了同样的错误。
我能做些什么来解决这个问题?
【问题讨论】:
-
似乎
ringphp包路径错误。请检查此packagist.org/packages/ezimuel/ringphp 以获得正确的安装和ringphp的官方文档是ringphp.readthedocs.io/en/latest
标签: laravel elasticsearch composer-php