Contêiner LXC: mktemp: falha ao criar arquivo via modelo

1

Em um novo recipiente novo, eu faço:

lxc-attach -n mycontainer -- apt-get install -y wget

Mas a instalação do wget falha parcialmente com a seguinte mensagem

...
Processing triggers for ca-certificates (20160104) ...
mktemp: failed to create file via template ‘/some/path/on/host/machine’: No such file or directory
dpkg: error processing package ca-certificates (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 ca-certificates
    
por Benoit Blanchon 01.03.2016 / 11:01

1 resposta

1

A solução foi simplesmente limpar as variáveis de ambiente, assim:

lxc-attach --clear-env -n mycontainer -- apt-get install -y wget

De lxc-attach --help :

  --clear-env   Clear all environment variables before attaching.
                The attached shell/program will start with only
                container=lxc set.
  --keep-env    Keep all current environment variables. This
                is the current default behaviour, but is likely to
                change in the future.
    
por 01.03.2016 / 11:02

Tags