无法在Mac Sierra上安装Elasticsearch(10.12.2)(Unable to install Elasticsearch on Mac Sierra (10.12.2))

编程入门 行业动态 更新时间:2024-10-23 05:52:21
无法在Mac Sierra上安装Elasticsearch(10.12.2)(Unable to install Elasticsearch on Mac Sierra (10.12.2))

尝试通过启动Elasticsearch 5.1.1时

$ elasticsearch

我得到输出:

Error: Could not find or load main class -Xms2g

我调查过:

我读过如何调用类可能是一个错误? 但我没有接触到这样做。 这个线程没有帮助,并不是我的问题,因为我没有安装插件。

我通过Homebrew安装。 以下是一些输出:

$ brew info elasticsearch elasticsearch: stable 5.1.1, HEAD Distributed search & analytics engine https://www.elastic.co/products/elasticsearch Conflicts with: elasticsearch@1.7, elasticsearch@2.4 /usr/local/Cellar/elasticsearch/5.1.1 (98 files, 35.2M) * Built from source on 2016-12-14 at 09:23:56 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/elasticsearch.rb ==> Requirements Required: java >= 1.8 ✔ ==> Caveats Data: /usr/local/var/elasticsearch/elasticsearch_GabbAHH/ Logs: /usr/local/var/log/elasticsearch/elasticsearch_GabbAHH.log Plugins: /usr/local/Cellar/elasticsearch/5.1.1/libexec/plugins/ Config: /usr/local/etc/elasticsearch/ plugin script: /usr/local/Cellar/elasticsearch/5.1.1/libexec/bin/plugin To have launchd start elasticsearch now and restart at login: brew services start elasticsearch Or, if you don't want/need a background service you can just run: elasticsearch $ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks! Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: mongodb ruby

我还尝试通过手动提取.tar.gz包进行最初的安装。 我起初得到了一些Java权限被拒绝的错误,但是在为自己运行一个chown给管理员之后我也得到了同样的Error: Could not find or load main class类型错误。

我刚刚将Java JDK更新到最新版本:1.8.0_112并将JAVA_HOME变量相应地设置为该目录。

最新版本的Elasticsearch 2(2.4.3)可以使用。 同时,Elasticsearch v5.0.2失败了。

如何在我的Mac上正确安装Elasticsearch?

When attempting to start Elasticsearch 5.1.1 via

$ elasticsearch

I get the output:

Error: Could not find or load main class -Xms2g

I've looked into:

I read it may be an error in how a class is called? But I'm not exposed to doing that. This thread doesn't help and isn't really my problem as I'm not installing a plugin.

I installed via Homebrew. Here is some output from that:

$ brew info elasticsearch elasticsearch: stable 5.1.1, HEAD Distributed search & analytics engine https://www.elastic.co/products/elasticsearch Conflicts with: elasticsearch@1.7, elasticsearch@2.4 /usr/local/Cellar/elasticsearch/5.1.1 (98 files, 35.2M) * Built from source on 2016-12-14 at 09:23:56 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/elasticsearch.rb ==> Requirements Required: java >= 1.8 ✔ ==> Caveats Data: /usr/local/var/elasticsearch/elasticsearch_GabbAHH/ Logs: /usr/local/var/log/elasticsearch/elasticsearch_GabbAHH.log Plugins: /usr/local/Cellar/elasticsearch/5.1.1/libexec/plugins/ Config: /usr/local/etc/elasticsearch/ plugin script: /usr/local/Cellar/elasticsearch/5.1.1/libexec/bin/plugin To have launchd start elasticsearch now and restart at login: brew services start elasticsearch Or, if you don't want/need a background service you can just run: elasticsearch $ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks! Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: mongodb ruby

I also tried originally installing via manually extracting the .tar.gz package. I at first got some Java permission denied errors, but after running a chown to admin for myself I also got this same Error: Could not find or load main class type error.

I just updated my Java JDK to the latest: 1.8.0_112 and set my JAVA_HOME variable to that directory accordingly.

The most recent version of Elasticsearch 2 (2.4.3) works. Meanwhile, Elasticsearch v5.0.2 fails.

What can I do to have Elasticsearch properly installed on my Mac?

最满意答案

您很可能在.bash_profile中遇到问题。 通常弹性开始在mac上开箱即用。

You most likely have a problem in your .bash_profile. Usually elastic starts out of the box on a mac.

更多推荐

本文发布于:2023-08-07 12:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464234.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Elasticsearch   Sierra   Mac   install   Unable

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!