gpt4 book ai didi

ubuntu - 无法在 Docker 容器中安装 ntopng(rfkill 问题)

转载 作者:行者123 更新时间:2023-12-04 19:13:59 25 4
gpt4 key购买 nike

这是我得到的错误:

/var/lib/dpkg/info/rfkill.postinst: 5: /var/lib/dpkg/info/rfkill.postinst: udevadm: not found
dpkg: error processing package rfkill (--configure):
subprocess installed post-installation script returned error exit status 127

和:
Setting up python3 (3.5.1-3) ...
Setting up lsb-release (9.20160110ubuntu0.2) ...
Setting up dh-python (2.20151103ubuntu1.1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
173 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Errors were encountered while processing:
rfkill
E: Sub-process /usr/bin/dpkg returned an error code (1)

这是我的 Dockerfile:
FROM ubuntu:xenial
MAINTAINER Jean-Nicolas Boulay <jn@yaloub.com>

# Source: http://packages.ntop.org/apt/

RUN export DEBIAN_FRONTEND=noninteractive \
&& export COMPOSER_ALLOW_SUPERUSER=1 \
&& export LC_ALL=C \
&& export LC_ALL="en_US.UTF-8" \
&& export LC_CTYPE="en_US.UTF-8" \
&& export LANGUAGE="en_US:en" \
&& export LANG=C \
&& dpkg --configure -a \
&& apt-get update -qq -y \
&& apt-get install --no-install-recommends --no-install-suggests -y -q \
apt-utils \
lsb-release \
ca-certificates \
curl \
wget \
rfkill \
&& wget http://apt.ntop.org/16.04/all/apt-ntop.deb \
&& dpkg -i apt-ntop.deb \
&& rm -rf apt-ntop.deb \
&& apt-get clean all \
&& apt-get update -qq -y \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends --no-install-suggests -y -q \
pfring \
nprobe \
ntopng \
ntopng-data \
n2disk \
cento \
pfring-drivers-zc-dkms \
nbox \
redis-server \
libpcap0.8 \
libmysqlclient20 \
python \
python-pip \
&& python -m pip install --upgrade pip \
&& pip install setuptools \
&& pip install supervisor \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/*

COPY redis.conf /etc/redis/redis.conf
COPY conf/supervisord/supervisord.conf /etc/supervisord.conf

EXPOSE 3000

CMD ["/usr/bin/supervisord"]

那么如何用 rfkill 解决这个问题呢?

最佳答案

它似乎在尝试运行 udevadm作为其安装后的一部分。

来自 searching ubuntu packages似乎 udev包提供了这个。

只要安装udev 应该可以安装rfkill预先。

我能够得到这个 dockerfile 来构建:

FROM ubuntu:xenial

RUN apt-get update && \
# Without this line, it did not build properly
apt-get install -y --no-install-recommends udev && \
apt-get install -y --no-install-recommends \
rfkill && \
apt-get clean

关于ubuntu - 无法在 Docker 容器中安装 ntopng(rfkill 问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45383204/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com