You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Apple Silicon macOS通过Homebrew安装Elasticsearch失败求助

在Apple Silicon macOS Sonoma上通过Homebrew安装Elasticsearch的问题与解决方法

问题描述

在Apple Silicon架构的macOS Sonoma系统上,尝试通过Homebrew安装Elasticsearch时遇到多个问题,常规安装方法均无效。

已尝试操作

1. 直接通过Homebrew安装

执行命令:

brew install elasticsearch

得到提示:

Warning: No available formula with the name "elasticsearch". Did you mean elasticsearch-full?

2. 使用Elastic官方tap源安装

执行命令:

brew tap elastic/tap
brew install elastic/tap/elasticsearch-full

安装失败,报错:

'conflicts_with "elasticsearch"' should be removed from elasticsearch-full.rb.
Please report this issue to the elastic/homebrew-tap tap
...
MethodDeprecatedError: Calling rmtree is disabled! Use FileUtils#rm_r instead.

需求目标

通过Homebrew安装并运行Elasticsearch 8.x版本,并使用brew services将其设为后台系统服务。

环境信息

  • macOS:Sonoma(Apple Silicon)
  • Homebrew:最新版本(已完成自动更新)
  • 终端:zsh

解决步骤

方法1:安装指定8.x版本的Elasticsearch-full

  1. 移除旧的Elastic tap(如果已添加):
brew untap elastic/tap
  1. 重新添加官方tap:
brew tap elastic/tap
  1. 安装8.x系列的elasticsearch-full(以8.13.4为例,可替换为最新8.x版本号):
brew install elastic/tap/elasticsearch-full@8
  1. 启动后台服务:
brew services start elastic/tap/elasticsearch-full@8
  1. 验证安装:
    执行以下命令,若返回Elasticsearch的版本信息则说明安装成功:
curl http://localhost:9200

方法2:临时修复Formula冲突问题(若方法1仍报错)

如果安装时仍出现conflicts_with相关报错,可手动修改Formula文件:

  1. 打开elasticsearch-full的Formula编辑界面:
brew edit elastic/tap/elasticsearch-full
  1. 在打开的文件中找到并删除conflicts_with "elasticsearch"这一行,保存退出。
  2. 重新执行安装命令:
brew install elastic/tap/elasticsearch-full@8
  1. 后续启动服务和验证步骤同方法1。

内容的提问来源于stack exchange,提问作者seyedrezabazyar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 01:42:41