Ad

Problem In Installing Elasticsearch For Laravel

- 1 answer

When I tried to install Elasticsearch for my Laravel instance using the following command:

composer require elasticsearch/elasticsearch

I got this error:

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.

then I tried to install the package mentioned in the error using the following command:

composer require guzzlehttp/ringphp

and I got the following warning:

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

Then I tried to install it again, and I got the same error.

What can I do to address the problem?

Ad

Answer

Please simply try installing it again - according to Packagist, there is a version 7.6.1 available that does not depend on such packages any more. This is something you can also find on https://github.com/elastic/elasticsearch-php/releases

Ad
source: stackoverflow.com
Ad