安装 GlusterFS 时出错

安装 GlusterFS 时出错

我正在尝试使用 Ansible 在 docker 容器中安装 GlusterFS。我遇到了一个错误,所以我尝试将其直接安装在容器中,但遇到了同样的错误(所以 Ansible 不是问题所在):

# apt-get install glusterfs-server   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
glusterfs-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nfs-common (1:1.2.8-6ubuntu1.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
invoke-rc.d: unknown initscript, /etc/init.d/statd not found.
dpkg: error processing package nfs-common (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
 nfs-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

这似乎是一个问题,nfs-common但我不知道如何解决它。

答案1

我尝试使用 Ubuntu 映像重现您的问题,但没有成功:

$ cat << EOF > Dockerfile
  FROM ubuntu:latest
  RUN apt-get update && apt-get install -y glusterfs-server
  EOF

$ docker build -t glusterfs-server .
Sending build context to Docker daemon 36.86 kB
Step 1 : FROM ubuntu:latest
 ---> 4ca3a192ff2a
Step 2 : RUN apt-get update && apt-get install -y glusterfs-server
 ---> Running in eab6258e0b4f
[packages are installed]
 ---> b2a878ae292f
Removing intermediate container eab6258e0b4f
Successfully built b2a878ae292f

$ docker run --rm -it glusterfs-server
root@d756093cbcff:/# glusterfs --version
glusterfs 3.7.6 built on Dec 25 2015 20:50:44
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc. <http://www.redhat.com/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.

因为这只是一个容器,我建议将其丢弃,然后使用简单的 Dockerfile 或剧本重新开始。

相关内容