为 Laravel 安装 elasticsearch 时出现问题

Problem in installing elasticsearch for Laravel

当我尝试使用以下命令为我的 Laravel 实例安装 Elasticsearch 时:

composer require elasticsearch/elasticsearch

我收到这个错误:

Problem 1 - elasticsearch/elasticsearch v7.6.0 requires guzzlehttp/ringphp dev-fork-elasticsearch -> no matching package found. - tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by elasticsearch/elasticsearch[5.0.x-dev]. - tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by elasticsearch/elasticsearch[5.0.x-dev]. - tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by elasticsearch/elasticsearch[5.0.x-dev]. - Can only install one of: elasticsearch/elasticsearch[v7.6.1, 5.0.x-dev]. - Installation request for elasticsearch/elasticsearch ^7.6 -> satisfiable by elasticsearch/elasticsearch[v7.6.0, v7.6.1]. - Installation request for tamayo/laravel-scout-elastic ^5.0 -> satisfiable by tamayo/laravel-scout-elastic[5.0.0].

Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details. - It's a private package and you forgot to add a custom repository to find it

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

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

然后我尝试使用以下命令安装错误中提到的包:

composer require guzzlehttp/ringphp

我收到以下警告:

Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested. Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested

然后我又尝试安装,还是一样的错误

我该怎么做才能解决这个问题?

请再次尝试安装它 - 根据 Packagist 的说法,有一个版本 7.6.1 不再依赖于此类软件包。您也可以在 https://github.com/elastic/elasticsearch-php/releases

上找到这些内容