2

我曾尝试通过 docker 安装对象存储。但是当我运行 docker 文件时,它给了我这个输出和错误消息:

Unpacking rsyslog (8.12.0-1ubuntu2) ...
Processing triggers for systemd (225-1ubuntu9.1) ...
Setting up init-system-helpers (1.23ubunt3) ...
Setting up cron (3.0p11-127ubuntu1) ...
Adding group `crontab' (GID 107) ...
Done.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: stop runlevel arguments (1) do not match cron Default-Stop values (none)
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libestr0 (0.1.10-1) ...
Setting up libjson-c2:amd64 (0.11-4ubuntu2) ...
Setting up libpopt0:amd64 (1.16-10) ...
Setting up logrotate (3.8.7-2ubuntu2) ...
Setting up ucf (3.0030) ...
Setting up rsyslog (8.12.0-1ubuntu2) ...

Creating config file /etc/rsyslog.d/50-default.conf with new version
Adding user `syslog' to group `adm' ...
Adding user syslog to group adm
Done.
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for systemd (225-1ubuntu9.1) ...
Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation of if you are using the unstable distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following package have unmet dependencies:
 initscripts : Recommends: psmisc but is is not going to be installed
               Breaks: sysklogd (< 1.5-6.2) but 1.5-6ubuntu1 is to be installed
 sysklogd : Depends: klogd or
                     linux-kernel-log-daemon
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
INFO[00038] The command [/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get install-y rsyslog; DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils net-tools curl
 gcc memcached rsync sqlite3 xfsprogs git-core libffi-dev pythong-setuptools sudo python-coverage python-dev python-nose python-simplejson python-xattr python-eventlet p
ython-greenlet python-pastedeploy python-netifaces python-pip python-dnspython python-mock sysklogd attr openssh-server openssh-client      python-1xml] returned a non-z
ero code: 100

链接到上述输出的屏幕截图

4

1 回答 1

0

为避免此错误,将此行添加到您的 docker 文件中

RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
RUN apt-get upgrade -y

RUN apt-get install -y ca-certificates inotify-tools pwgen supervisor unzip wget python-setuptools

RUN sed -i 's/^\(\[supervisord\]\)$/\1\nnodaemon=true/' /etc/supervisor/supervisord.conf
于 2016-08-22T15:10:42.840 回答