以下是我遇到的错误:
/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解决这个问题?
答案 0 :(得分:1)
似乎是尝试将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