【Mac】mac 安装 prometheus 报错 prometheus: prometheus: cannot execute binary file

1、官网下载

Download | Prometheus

这里下载的是prometheus-2.51.2.linux-amd64.tar.gz

2、现象

解压之后启动Prometheus

启动脚本:

nohup ./prometheus --config.file=prometheus.yml > prometheus.out 2>&1 &

prometheus.out日志文件:

3、分析

cannot execute binary file通常意味着尝试执行的二进制文件(在这种情况下是 prometheus)与系统架构或操作系统不兼容。

从以下几个方面进行自查:

检查文件权限
使用 chmod 命令确保文件具有执行权限:

chmod +x ./prometheus

检查文件类型
使用 file 命令来检查文件类型,确认它是一个 ELF 可执行文件:

file ./prometheus

检查系统架构
使用 uname -m 命令来检查你的系统架构,并确认你下载的 Prometheus 二进制文件与你的系统架构相匹配。

uname -m

系统是 x86_64 架构,确保你下载了适用于该架构的 Prometheus 二进制文件。

4、解决方案

编译环境是否相同?

mac的内核是darwin,linux的版本不匹配。重新下载,启动成功!

下载prometheus-2.51.2.darwin-amd64.tar.gz

参考:【Mac】mac 安装 prometheus 报错 prometheus: prometheus: cannot execute binary file_./prometheus: cannot execute binary file-CSDN博客

相关推荐

  1. 安装Paddlehub

    2024-05-01 12:00:02       62 阅读
  2. pip安装SSL

    2024-05-01 12:00:02       70 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-01 12:00:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-01 12:00:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-01 12:00:02       87 阅读
  4. Python语言-面向对象

    2024-05-01 12:00:02       96 阅读

热门阅读

  1. Google Test 使用笔记(二)

    2024-05-01 12:00:02       36 阅读
  2. MIKE + MATLAB - 使用DHI工具包时读取数据

    2024-05-01 12:00:02       28 阅读
  3. 面试准备之九种排序算法之快速排序

    2024-05-01 12:00:02       31 阅读
  4. 一文掌握python杖举类(Enum)

    2024-05-01 12:00:02       33 阅读
  5. Mysql优化之参数调优

    2024-05-01 12:00:02       25 阅读
  6. linux安装MySQL 8.0笔记

    2024-05-01 12:00:02       36 阅读
  7. 2012NOIP普及组真题 1. 质因数分解

    2024-05-01 12:00:02       34 阅读
  8. NPDP产品经理认证报考条件及流程

    2024-05-01 12:00:02       34 阅读