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

M1 Pro芯片MacBook Pro安装JMeter报错问题及解决方案咨询

M1 Pro芯片Mac安装JMeter报错问题解答

报错现象

在搭载M1 Pro芯片、macOS Monterey 12.5系统的MacBook Pro上执行brew install jmeter时,出现以下报错:

Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Warning: Unexpected method 'on_arm' called on Cask zulufx.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Warning: Unexpected method 'arch' called on Cask zulufx.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs

Error: openjdk: undefined method `on_arm' for #<Resource:0x0000000137b0b020>

报错原因

  1. Homebrew的Cask配置中,zulufx组件使用了已废弃的on_arm和arch方法,触发警告。
  2. JMeter依赖的OpenJDK安装流程中,同样调用了已被移除的on_arm方法——该方法是旧版本Homebrew用于ARM架构适配的API,新版本已不再支持,直接导致安装失败。

解决办法

  • 更新Homebrew到最新版本,修复API兼容问题:
    brew update && brew upgrade
    
  • 清理Homebrew缓存并修复潜在依赖损坏:
    brew cleanup && brew doctor
    
  • 先手动安装兼容ARM架构的OpenJDK(JMeter推荐使用Java 8/11/17版本):
    brew install openjdk@17
    
    安装完成后配置Java环境变量,将以下内容添加到~/.zshrc或~/.bash_profile:
    export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
    export JAVA_HOME=$(brew --prefix openjdk@17)
    
    执行source ~/.zshrc使配置生效。
  • 重新安装JMeter:
    brew install jmeter
    
  • 如果仍存在zulufx相关警告,先卸载该组件再重试:
    brew uninstall --cask zulufx
    

M1 Pro芯片Mac的JMeter兼容性

M1 Pro芯片的MacBook Pro完全可以安装并正常运行JMeter。官方JMeter已支持ARM架构,无论是通过Homebrew安装,还是直接从官网下载压缩包解压使用,只要配置好兼容的Java环境,就能正常开展性能测试工作。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.22 13:36:28