【问题标题】:Error installing fluentd-ui while building own Docker image在构建自己的 Docker 映像时安装 fluentd-ui 时出错
【发布时间】:2018-09-03 12:24:34
【问题描述】:

我正在尝试基于 Fluentd 的 v1.2-debian 映像和 fluentd-ui 基于浏览器的管理器构建自定义 Docker 映像。我根据requirements添加了一些额外的包:

RUN buildDeps="sudo make gcc g++ libc-dev ruby-dev build-essential libssl-dev libxml2-dev libxslt1-dev" \

但构建失败并出现此错误:

Error installing fluentd-ui:
  ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.8.4/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20180903-647-puzk49.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.3.0
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
...

如何修复错误?

【问题讨论】:

    标签: docker fluentd


    【解决方案1】:

    错误消息指向缺少 zlib 依赖项。您可以通过将压缩库 zlib1g-dev 添加到构建依赖项列表来修复它:

    RUN buildDeps="sudo make gcc g++ libc-dev ruby-dev build-essential libssl-dev libxml2-dev libxslt1-dev zlib1g-dev" \
    

    现在您应该能够构建一个安装了 fluentd-ui 的 Docker 映像。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-23
    • 2020-04-28
    • 2020-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-13
    相关资源
    最近更新 更多