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

编译Fluent Bit执行cmake提示缺少YAML开发依赖如何解决

Fluent Bit 源码编译YAML依赖缺失解决方法

源码构建Fluent Bit执行cmake配置步骤时,若保留YAML配置功能开启状态,会触发如下报错:

CMake Error at CMakeLists.txt:678 (message):
YAML development dependencies required for YAML configuration format
handling.

This is a build time dependency, you can either install the dependencies or
disable the feature setting the CMake option -DFLB_CONFIG_YAML=Off .

该报错本质是系统未安装YAML格式对应的开发库,不需要关闭YAML功能,根据自身运行的操作系统安装对应依赖包即可解决:

各系统对应依赖安装命令

  • Debian/Ubuntu 及衍生发行版(含树莓派OS、Linux Mint等)
    安装libyaml-dev包,执行命令:
    sudo apt update && sudo apt install -y libyaml-dev
    
  • RHEL/CentOS/Fedora/Rocky Linux/AlmaLinux 等RPM系发行版
    安装libyaml-devel包,RHEL/CentOS 7/8/9版本需提前配置EPEL源,执行命令:
    # 支持dnf的新版本系统
    sudo dnf install -y libyaml-devel
    # 旧版本使用yum包管理器的系统替换为
    # sudo yum install -y libyaml-devel
    
  • Arch Linux/Manjaro 等Arch系发行版
    Arch系开发文件无单独-dev后缀,直接安装libyaml包即可,执行命令:
    sudo pacman -Syu libyaml
    
  • openSUSE 系列发行版
    安装libyaml-devel包,执行命令:
    sudo zypper install -y libyaml-devel
    
  • macOS(Homebrew环境)
    安装libyaml包,执行命令:
    brew install libyaml
    

依赖安装完成后,重新执行cmake配置、编译、安装流程即可正常启用YAML配置格式支持。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.28 22:36:20