我正在尝试使用基于浏览器的v1.2-debian管理器,基于Fluentd的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
...
如何解决该错误?
答案 0 :(得分:0)
该错误消息指出缺少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映像。