Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 无法在Docker容器中安装ntopng(rfkill问题)_Ubuntu_Docker_Ubuntu 16.04 - Fatal编程技术网

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

Ubuntu 无法在Docker容器中安装ntopng(rfkill问题),ubuntu,docker,ubuntu-16.04,Ubuntu,Docker,Ubuntu 16.04,以下是我得到的错误: /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 以及: 这是我的Docke

以下是我得到的错误:

/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
以及:

这是我的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"]
来自ubuntu:xenial的

维修人员Jean Nicolas Bouley
#资料来源:http://packages.ntop.org/apt/
运行导出DEBIAN_前端=非交互式\
&&导出编写器\u允许\u超级用户=1\
&&导出LC_ALL=C\
&&出口信用证所有=“en_US.UTF-8”\
&&出口信用证类型=“en_US.UTF-8”\
&&export LANGUAGE=“en_US:en”\
&&导出语言=C\
&&dpkg—配置-a\
&&apt获得更新-qq-y\
&&apt get install——无安装建议——无安装建议-y-q\
apt utils\
lsb释放\
ca证书\
卷曲\
wget\
rfkill\
&&wgethttp://apt.ntop.org/16.04/all/apt-ntop.deb \
&&dpkg-i apt-ntop.deb\
&&rm-rf apt-ntop.deb\
&&善待一切\
&&apt获得更新-qq-y\
&&apt获得升级-y\
&&apt get install——无安装建议——无安装建议-y-q\
pfring\
nprobe\
ntopng\
ntopng数据\
n2disk\
森托\
pfring驱动器zc-dkms\
nbox\
redis服务器\
libpcap0.8\
libmysqlclient20\
蟒蛇\
python pip\
&&python-mpip安装——升级pip\
&&pip安装工具\
&&pip安装主管\
&&易于清洗\
&&rm-rf/var/lib/apt/lists/*\
&&rm-rf/tmp/*\
&&rm-rf/var/tmp/*
复制redis.conf/etc/redis/redis.conf
复制conf/supervisord/supervisord.conf/etc/supervisord.conf
暴露3000
CMD[“/usr/bin/supervisord”]

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

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

从这里看来,
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
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