'apt-get update' fails inside of ubuntu 14.04 container

Created:

2016-11-16 13:12:24 UTC

Modified:

2017-06-19 05:34:33 UTC

1

Was this article helpful?


Have more questions?

Submit a request

'apt-get update' fails inside of ubuntu 14.04 container

Applicable to:

  • Plesk 12.0 for Linux

Symptoms

  1. /etc/apt/trusted.gpg is empty in a newly created ubuntu 14.04 container
  2. apt-get update executed inside of an ubuntu 14.04 container fails with a similar error message:
    # apt-get update
    ...
    ...
    W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
    W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
    W: GPG error: http://security.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
    W: GPG error: http://archive.ubuntu.com trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

Cause

The issue is recognized as product bug with id #PSBM-27984.

Resolution

The permanent fix will be included in one of the future product updates.

The workaround is:

  • In order to fix the issue for the already created containers, execute the following command inside of the container:

    # apt-key update
  • In order to avoid the issue for the newly created container, modify the post-install script for the template ( /vz/template/ubuntu/14.04/x86_64/config/os/default/post-install and /vz/template/ubuntu/14.04/x86/config/os/default/post-install ):

    --- post-install_orig        
    +++ post-install_fixed
    @@ -118,6 +118,9 @@

    fi

    +# Download apt keys
    +apt-key update
    +
    # Disable bind9 ifup hook
    for i in etc/network/if-down.d/bind9 etc/network/if-up.d/bind9; do
    mv $i $i.disabled

and update the template cache after this modification:

    # vzpkg update cache ubuntu-14.04-x86
# vzpkg update cache ubuntu-14.04-x86_64
Have more questions? Submit a request
Please sign in to leave a comment.