无法通过Homebrew启动elasticsearch服务器

时间:2021-11-19 20:54:30

So I have installed elasticsearch through brew:

所以我通过brew安装了elasticsearch:

$ brew install elasticsearch

Then when I run the elasticsearch server:

然后当我运行elasticsearch服务器时:

elasticsearch -f -D es.config=/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml

I get this error:

我收到此错误:

{0.20.4}: Setup Failed ...
- FailedToResolveConfigException[Failed to resolve config path [/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], tried file path [/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], path file [/usr/local/Cellar/elasticsearch/0.20.4/config/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], and classpath]

How can I fix this? Any ideas och suggestions are welcome.

我怎样才能解决这个问题?任何想法都欢迎。

I did this and it had worked for me:

我这样做了,它对我有用:

Get the package:

获得包裹:

$ curl -k -L -o elasticsearch-0.20.2.tar.gz http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz

Unzipp:

Unzipp:

$ tar -zxvf elasticsearch-0.20.2.tar.gz

Run the elasticsearch server:

运行elasticsearch服务器:

./elasticsearch-0.20.2/bin/elasticsearch -f

2 个解决方案

#1


15  

try with

试试吧

elasticsearch -f -Des.path.conf=/usr/local/Cellar/elasticsearch/0.19.3/config/

#2


7  

That's weird, my install asked me to run elasticsearch slightly different. I got it running with:

这很奇怪,我的安装要求我运行elasticsearch略有不同。我让它运行:

Install

安装

$ brew update
$ brew install elasticsearch

Run Elasticsearch

运行Elasticsearch

$ elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml

As @karmi said, brew info elasticsearch shows how to run elasticsearch on your system.

正如@karmi所说,brew info elasticsearch显示了如何在您的系统上运行elasticsearch。

#1


15  

try with

试试吧

elasticsearch -f -Des.path.conf=/usr/local/Cellar/elasticsearch/0.19.3/config/

#2


7  

That's weird, my install asked me to run elasticsearch slightly different. I got it running with:

这很奇怪,我的安装要求我运行elasticsearch略有不同。我让它运行:

Install

安装

$ brew update
$ brew install elasticsearch

Run Elasticsearch

运行Elasticsearch

$ elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml

As @karmi said, brew info elasticsearch shows how to run elasticsearch on your system.

正如@karmi所说,brew info elasticsearch显示了如何在您的系统上运行elasticsearch。